Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog closed then when reopened data not collected/showed.

 
Peter Dennis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a JDialog that gets data from a JTable on my main screen which I store in a Vector depending on which rows of the JTable are selected. I then send this vector to my JDialog. The first time I click on the button that launches the JDialog the data is displayed. However if I click the close button on my dialog which I have implemented using:



(Not sure if this is relevant).

when I click on the button in the main screen to show the dialog again, the data isn't collected from the table, the vector is subsequently empty and I get an empty JDialog.

Does anyone know why it seems to ignore the code on subsequent presses of the button to launch the JDialog?

Many thanks,

Peter.
 
Peter Dennis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, sorry I fixed it. I was clearing the selection from the main screen when the JDialog closed which was essential for the data collection and sending via vector to JDialog.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic