aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable within JDialog  - Focus Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable within JDialog  - Focus Problem" Watch "JTable within JDialog  - Focus Problem" New topic
Author

JTable within JDialog - Focus Problem

iyappan sankaran
Ranch Hand

Joined: Aug 11, 2003
Posts: 58
hi guys,

i written a Jtable within a JDialog.Using keymapping i register few keys.the problem is once i launch the application the focus is on JTable not in Jdilog .so while i press key the evnts are associted with table not with dialog.

how to change the focus to dialog from table. i always want the focus is on dialog.

thanks
iyappan sankaran
Ranch Hand

Joined: Aug 11, 2003
Posts: 58
Few explanations towards problem

Here the event is consumed by table. so we have to redirect the evnts to dialog. There is one possiblity using KeyEventDispatch interface provides option of redirect the event.

but i want to make use of "registerKeyboardAction" how to do
pls help me.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
do you have setModal(true) for the dialog?
 
wood burning stoves
 
subject: JTable within JDialog - Focus Problem