Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setPreferredSize, setMinimumSize, setMaximumSize

17 views
Skip to first unread message

Greg Jorstad

unread,
Mar 30, 2000, 3:00:00 AM3/30/00
to
Configuration Information:
Product: Visual Cafe for Windows Enterprise Suite 3.0

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

Symantec/Ted Flug

unread,
Mar 30, 2000, 3:00:00 AM3/30/00
to
Hello 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

Greg Jorstad

unread,
Mar 31, 2000, 3:00:00 AM3/31/00
to
Could you explain what you mean when you say they aren't true bean
properties? They follow the get/set naming convention that
identifies a bean property and they show up as a property when you
get to the CreateProperties item in the JavaBean wizard.

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

Tim Dutton (Symantec)

unread,
Apr 5, 2000, 3:00:00 AM4/5/00
to
Greg,

It looks like this is by design.

Regards,

Tim Dutton
Internet Tools Technical Support
Symantec Corporation

0 new messages