This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable within JDialog - Focus Problem

 
iyappan sankaran
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you have setModal(true) for the dialog?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic