Only 49 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

using JOtionPane  RSS feed

 
sara Jacob
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using Joptionpane which displays a pannel contains a table and a text.
optionpane's control is in OK button (by default).how can i chage it to the table in the pannel,so that i can choose a row using keyboard
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Not sure I understand the question, but the whole idea of the Dialog in JOptionPane is that it is "modal." It takes the focus from the rest of the app and won't allow you to access it until you dismiss the dialogue.
If you need access to the app then you will have to find a way to create a non-modal dialogue window, or (preferably) not use a dialogue in the first place.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add a timer (just before you show the optionPane), 250ms, repeats false,
with the action table.requestFocusInWindow()
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!