Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing wait for response

 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, given a swing button, how can I make sure that button is clicked before I continue executing the rest of the code. My problem is when I FIRST start client, no properties file is present. I need to first store such info then re-read it to connect to the database.
 
Mahesh Kumaraguru
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put "the rest of code" in the Swing button's ActionListener's action performed method.
 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it by using a JDialog window instead of the tradition JFrame window.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic