File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame and JDialog

 
cat nill
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 47299
52
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain more about what is going wrong.

And welcome to the Ranch

Moving discussion to our GUIs forum.
 
cat nill
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tnx .What can I do to show list in textArea when I close Dialog?Here is the code:
 
Campbell Ritchie
Sheriff
Pie
Posts: 47299
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic