I am using Visual Cafe Enterprise 3.1 with Java 2.
The properties MinimumSize, MaximumSize, and PreferredSize appear to
be fairly essential to laying out dialogs. However, these properties
are not showing up in the Property Editors in the IDE. I can set
them directly in the code but then the Form Designer does not respect
them. This leads to the Form Designer showing something different
than the program when run.
Is there some way to make these properties editable in the Property
List and to convince the Form Designer respect their constraints?
I pulled up JBuilder to make sure I wasn't missing something and
sure enough all the properties I mention were present and the visual
editor respected them as I would expect.
Greg
These properties aren't true bean properties so the aren't shown.
You can try subclass the component as a bean and set your own bean
property that you would set the preferred, minimum and maximum
properties.
Ted Flug
Symantec Internet Tools
I was able to create a MyButton2 based off of JButton with the
properties PreferredSize2, MinimumSize2, and MaximumSize2 which
called the appropriate functions. The Form Designer respected these
sizes interactively as I hoped.
Unfortunately I had to get past a large series of problems to get to
that point. I discovered that any time I tried to add a property
manually in the bean file, that various errors would occur and the
changes would not be recognized in the inspector (even though I made
the additions to the BeanInfo class). Is it true that you must use
the JavaBean wizard to create the JavaBeans and that you have to
start from scratch if a JavaBean property needs to added or deleted?
The errors I typically saw looked like this:
Internal VM (15:27:33): Exception occured while trying to get the
initial value of a property.
Internal VM (15:27:33): object =
Internal VM (15:27:33):
MyButton2[,0,0,400x300,invalid,alignmentX=0.0,alignmentY=null,border=
javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@6f4c5f,fla
gs=32,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,dis
Internal VM (15:27:33):
abledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIReso
urce[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=tru
e,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSele
Internal VM (15:27:33):
ctedIcon=,selectedIcon=,text=,defaultCapable=true]
It also crashed and then managed to create duplicate control sections
so it wouldn't compile or operation. I tried to delete the sections
manually and eventually had to rebuild my project.
Greg
It looks like this is by design.
Regards,
Tim Dutton
Internet Tools Technical Support
Symantec Corporation