File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 38334
    
  23
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()
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: using JOtionPane