• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing Beans in BDK (Mixing Lightweight and Heavyweight)  RSS feed

 
Samuel Caro
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a JComboBox bean but when I add it to the BDK the POPUP will not show unless the popup does NOT fit in the
BDK Frame. In other words, if the BDK is small enough the popup has to be painted outside the frame and everything is ok. However, when the BDK frame is large enough the popup fits inside the frame the popup will not show.



I'm pretty sure it has to do with mixing lightweights with heavyweights but do I fix the problem from the bean? I plan to use the bean in any GUI Builder.





This is the code I have.


<PRE>
/** PComboBox Class Definition
*/
public class PComboBox
extends
JComboBox
implements
java.io.Serializable
{
private static String[] data = { "One", "Two", "Three",};
/** Private Members
*/

/** Default Constructor
*/
public PComboBox(){
super(data);
this.setMinimumSize(new Dimension(80, 20));
// Force HeavyWeight popup
setLightWeightPopupEnabled(false);
}
}
</PRE>



Thank you!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!