• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JTable within JDialog - Focus Problem

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you have setModal(true) for the dialog?
 
reply
    Bookmark Topic Watch Topic
  • New Topic