• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing wait for response  RSS feed

 
K. Tsang
Bartender
Posts: 3639
16
Firefox Browser Java Mac OS X
  • 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: 3639
16
Firefox Browser Java Mac OS X
  • 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
Boost this thread!