This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes adding panel into JDialog at run time problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "adding panel into JDialog at run time problem" Watch "adding panel into JDialog at run time problem" New topic
Author

adding panel into JDialog at run time problem

Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
Hi ,
I am adding one component at a time into the jdialog at run time.
What I do , when I launch jdialog instance first time I added one
component into the jdialog. when OI press next button it removes this
component and adding next one , but the problem is that is is not showing in the jdialog.
Please give me any idea that
How I can add component into jdialog at run time.
Thaks In Advance.
- vikas
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I use SwingUtilities.updateComponentTreeUI();


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Carlos Failde
Ranch Hand

Joined: Oct 20, 2000
Posts: 84
Another way is to call repaint() after you have removed the old component and added the new one.
[ April 28, 2004: Message edited by: Carlos Failde ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: adding panel into JDialog at run time problem