• Post Reply Bookmark Topic Watch Topic
  • New Topic

JWindow & Focus

 
Phil Harron
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having a certain amount of trouble getting a JWindow to get & keep its focus.
My application has a table within a frame, which when you right-click on a certain table column header a Jwindow appears, with a panel and a combo box. The problem is that the JWindow never seems to get the focus and when i request focus for the Jwindow it seems a bit fussy.
Anyone else had any such problem. help in this area would be very helpful
Thanks.
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to make it modal (you will have to switch to JDialog in this case, I think). it will then stay in front of the frame and have the focus until it is closed.
another way is, to put it in another layer (PopupLayer e.g.). see the API of JLayeredPane.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!