aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: adding panel into JDialog at run time problem
 
Similar Threads
Instantiate a class
JTextField.requestFocus is not working in jre 1.6
JTable Cell and Tab Problem[jdk1.3 ]
JTable viewing problem
Multiple Flashing carets