Keyboard Focus problems in JTextAreas within JInternalFrames
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Janine_Olley
Posted On:   Thursday, March 29, 2001 06:40 AM

I am creating text editor application using JInternalFrames. However all keyboard entries only go to the frame most recently opened, no matter which frame is selected. If that frame is closed the keyboard entries don't go anywhere.
Help!

Re: Keyboard Focus problems in JTextAreas within JInternalFrames

Posted By:   Greg_Murray  
Posted On:   Monday, April 2, 2001 11:22 PM

I have over come this problem by adding the following InternalFrameAdapter.


internalFrame.addInternalFrameListener(new InternalFrameAdapter(){
public void internalFrameActivated(InternalFrameEvent e){
// this is a must to restore the focus on the frame
e.getInternalFrame().restoreSubcomponentFocus();
}
});

Enjoy,

greg
About | Sitemap | Contact