• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem seeing JDialog's components  RSS feed

 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I have this minor problem. When I click the "show form" button, a dialog window pops up. The dialog consists of text fields, checkbox, combo boxes representing form's fields. I enter data into those fields and click "create" button. Now I click the "show form" button again, I can't see those text fields. Also the data entered earlier is somehow still there, so if I click "create", it will not prompt me error. Why is that? My code looks like:



The hotelTextField component doesn't show up properly when I click the "show form" button again. If I entered some data in the field those data automatically is shown too the 2nd time. Please help.
 
Mikko Kohtamäki
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you dont create new instance each time you can call removeAll() at the beginning of your build method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!