• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

General Frame problem

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic