How do you make a JavaBean which has a static size?

John Zukowski

To make a fixed size component, just override the getMinimum/Preferred methods to return the fixed size. You should also provide the bean with its own BeanInfo class to effectively hide the size properties. That way, they won't appear. You may find it necessary to update the deprecated methods, too, like preferredSize(), but that shouldn't be necessary. See the Juggler bean that comes with the BDK for one such fixed size component.

If you're class isn't a subclass of Component, all this is irrelevant.