aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFrame and JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame and JDialog" Watch "JFrame and JDialog" New topic
Author

JFrame and JDialog

cat nill
Greenhorn

Joined: Jun 05, 2014
Posts: 2
Please help.I have JFrame and when I click a button which is in frame JDialog is opened.Now,how can I refresh JFrame when close JDoalog?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38334
    
  23
Please explain more about what is going wrong.

And welcome to the Ranch

Moving discussion to our GUIs forum.
cat nill
Greenhorn

Joined: Jun 05, 2014
Posts: 2
Tnx .What can I do to show list in textArea when I close Dialog?Here is the code:
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38334
    
  23
I can see all sorts of things wrong with that, I am afraid. Just a few:
Why have you got a List inside a class which should be for displays? Why is that List static? You should have classes which implement the logic and they should be completely separate from the GUI. In fact you should be able to put a completely different GUI atop the logic without changing it.
Is that code complete? You have some actionPerformed methods, but nothing shown which implements a Listener. The performed methods do not seem to give any instructions to the text area to update itself, which is presumably why nothing happens when you close the dialogues.
I am not sure that a modal dialogue is the best way to update your list of players.
That looks like code produced by NetBeans. Is it? Your inconsistent indentation makes it difficult to see where one class ends and the next begins.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFrame and JDialog