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.
SCJP 1.4<br />SCJD (Ongoing)
posted 15 years ago
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.