• Post Reply Bookmark Topic Watch Topic
  • New Topic

General Frame problem  RSS feed

 
Alan Brooks
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,

My problem is that in one of my screens I have options to remove from a JTree by pressing buttons. Within the button lisitener the current frame make a new frame with some options on it and then it redraws the new JTree based on teh selected options in the new frame. The problme is that the JTree is redrawen before the new frame has been closed so it does not update the JTree correctly. Does anyone know how I can make the code wait till the new frame is closed.

Here is were my code problem is


[ December 28, 2008: Message edited by: Alan Brooks ]
 
Andre Uhres
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can use a modal JDialog (instead of JFrame):
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html
 
Alan Brooks
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks works fine now with JDialog

[ December 28, 2008: Message edited by: Alan Brooks ]
[ December 28, 2008: Message edited by: Alan Brooks ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!