This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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.

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?
Have you checked out Aspose?
subject: JTable within JDialog - Focus Problem
jQuery in Action, 3rd edition