Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to delete memory information for a JDialog  RSS feed

 
Heather
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all
I have a JDialog. I defined such functions for it:
(1)create_win(): this is to put components to the window
(2)show_win(): this is to show the window
This window has some textfields, comboboxs.
My case is that I create the dialog once, and I may show it many times. Every time when I do not need the window, I use disclose() method to close it. and when I need it, I use show() method open it.
The problem is except the first time I open the window, it is clean, from then on, whenever I use show() to open it, it still holds the information I input last time in all textfields, comboboxes and other components.
Does sb know how to clear the information left from last time?
Thanks you very much!
Also thanks to those who answer my yesterday's question about Window close problem, it has worked now with your suggestions.
Heather
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Heather",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!