Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > JPanel - setVisible(true)
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th October 19:31
thomas weidenfeller
External User
 
Posts: 1
Default JPanel - setVisible(true)



The usual way to do such things is to use a CardLayout. That layout
manager is exactly made for switching between a number of panels.

It works by accident. More precisely, the setVisible() just happens to
triggers the revalidation and repainting of the component. The right way
to do it would be to invalidate, validate, and possibly also to repaint.

But the CardLayout would be a much better choice.

/Thomas

--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666