How do you make a JavaBean which has a static size?
Location: http://www.jguru.com/faq/view.jsp?EID=39608 Created: Apr 24, 2000 Modified: 2001-07-24 10:28:25.884 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by Asim Raja (http://www.jguru.com/guru/viewbio.jsp?EID=24654 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.