(Answer) (Category) FAQ-O-Matic : (Category) General : (Category) Designer :
How does the Designer work?
I've been converting some of my existing code to display properly in the designer. Between the FAQs and release notes, and the behavior I'm seeing in the designer, here's the way I think it really works:

  You open the java source file and click on 'Design'.

  Designer looks at the source file and identifies:

    1) The parent class
    2) The class fields (which have initializers)
    3) The jbInit() method

  Designer then instantiates an object of the PARENT class and displays
  its outline in the  designer pane.  This is designer's model of your object.

  Designer then inserts the class fields into the structure pane.

  Designer then reads through jbInit() looking for statements which
  affect any of the items Designer has already created within its model.
  Excess stuff is simply ignored.  Identifiable stuff is reflected in
  the design pane and the structure pane.

  The constructor is NOT executed, Designer simply verifies that it
  exists and that it calls jbInit().

So, Designer is reading the source code and FAKING the object. It's impossible to use the new object's constructor, class (static) methods, or instance methods to affect anything visible within the designer. You can call methods in the parent class, or methods in other classes, but nothing in the class-under-construction is accessible.
Designer is displaying a model of your object's UI, it not displaying your object.

If your object's parent class is an abstract class, the Designer displays a "red bean" because it can't instantiate an instance of the abstract parent class for its model.


2001-Mar-06 7:54pm gyles19@visi.com

Actually the designer can handle public static methods for the class under design once they have been compiled. It cannot be tell the difference between them or any other public static method.
2001-Sep-04 11:39am ghamer@troikanetworks.com
[Append to This Answer]
2001-Sep-04 11:39am
Previous: (Answer) How do I convert my own/other IDE code to display in the Designer?
Next: (Answer) How do I write my own proxy classes for the Designer?
This document is: http://www.visi.com/~gyles19/cgi-bin/fom.cgi?file=96
[Search] [Appearance]
This is a Faq-O-Matic 2.709.
This FAQ administered by gyles19@visi.com.

Other JBuilder Links

Java Community
Java Tools
Code Central
JB OpenTools
Community
Recent
Threads
Borland Chat
Chat FAQ
Feature Matrices
3.0 |  3.5 |  4.0
5.0 |  6.0 |  7.0
Shop for
JBuilder
JBuilder
Downloads
and reg keys
Report Piracy
Online Manuals
4.0 |  5.0 |  6.0
7.0
Borland
DevSupport's
Bug/RFE Form

Quality Central Client
JB Patches &
Updates
JBuilder FAQs TIs
JBuilder
Newsgroups
Tamaracka's
News Archive
Mr. Haki's
JBuilder Machine
JGuru's
JBuilder FAQ
Sun's Bug
Parade
Netring Home - About - Privacy
The
JBuilder Netring Logo
The Borland JBuilder Netring by JBuilder FAQ-O-Matic
[ Join Now | List Sites | Random | << Prev | Next >> ]
[ Previous 5 Sites | Skip Previous | Skip Next | Next 5 Sites ]