• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JTable within JDialog - Focus Problem

 
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.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you have setModal(true) for the dialog?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!