Answer to Question #25482 in Java | JSP | JSF for Joakim
2. Set both prefered size to JPanel and jbutton you add
>I have tried to use setLayout(null); but then the button disappears!
This stuff happens when some element has no size set. If the element has no
size, no location or even no text SWING can easily decide to not draw it at all
for better optimization, seriously, no one needs sizeless empty button
Hope it will help
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!