🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11846

Re: The Dreaded Red Bean

#11846
From: John Hines
Date: Mon, 05 Apr 1999 00:00
66 lines
2610 bytes
Problem is cockpit error.  When I made the constructors public, the red bean
went away.

Sorry to waste your time.

John H


John Hines wrote in message <7e0n2h$fci3@forums.borland.com>...
>New job.  I'm using some inherited code under JBuilder 2.01 ond JDK 1.2.1.
>(Although I got the same results from JDK 1.2.)  The class BaseTabPanel
>shows as a red bean in the designer but the program compiles and runs as
>expected.  What's happening?
>John Hines
>
>//FYI
>//H2. Visual Design Tools and JavaBeans
>//-------------------------------------
>//* If you see one of your components as a red box with its class name at
>//the top, JBuilder has not been able to create an instance of that
>component for
>//the designer.  This is called a "Red Bean".  Some reasons you might see a
>Red
>//Bean are:
>//   1) That class has no default (parameterless) constructor
>//   2) That class threw exceptions on every constructor JBuilder tried
>//   3) That class is the 'this' object and it extends an abstract class
>//Don't see how any of these apply
>
>package com.sequel.care.gui;
>import java.awt.*;
>import javax.swing.JPanel;
>public class BaseTabPanel extends JPanel{
>      BaseModel model;
>      BaseTabPanel( )     {   }
>      BaseTabPanel( BaseModel model )      {  this.model = model; }
>      String getTitle() { return "unknown"; }
>}
>public class BaseModel
>{
>      Server theServer;
>      void retrieveData() { }
>      void saveData() { }
>      public BaseModel()  { }
>      public BaseModel(Server server)   { theServer = server; }
>}
>public class Server
>{
>      int index;
>      Server()    {     index = 0;  }
>      void reset()  {    index = 0;  }
>      BaseTabPanel getNextScreen()      {
>            BaseTabPanel next = null;
>            switch (index)            {
>                  case 0:      next = new NewCallPanel(new
BaseModel(this));
>                                    break;
>                  case 1:    ...
>              default:
>            }
>            index++;
>            return next;
>      }
>}
>
>
Technical Details
Message-ID: <7eah5e$nkv12@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7e0n2h$fci3@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f0b3aa7e075fc773
X-Google-Attributes: gid111d45,public
From: "John Hines" <jrhines@onramp.net>
Subject: Re: The Dreaded Red Bean
Date: 1999/04/05
Message-ID: <7eah5e$nkv12@forums.borland.com>
X-Deja-AN: 462875193
References: <7e0n2h$fci3@forums.borland.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing