This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes using JOtionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "using JOtionPane" Watch "using JOtionPane" New topic
Author

using JOtionPane

sara Jacob
Greenhorn

Joined: Jun 26, 2008
Posts: 1
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

Joined: Oct 13, 2005
Posts: 44068
    
  33
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

Joined: Jun 09, 2003
Posts: 4632
add a timer (just before you show the optionPane), 250ms, repeats false,
with the action table.requestFocusInWindow()
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: using JOtionPane
 
jQuery in Action, 3rd edition