• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing wait for response

 
K. Tsang
Bartender
Posts: 3610
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: 3610
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!