Starting class my application is a JFrame. When the JFrame is kicked off, it will open a JinternalFrame. JFrame will stay through out the application. When the JInternalFrame is opened, it does not have the focus. User has to explicitly click the first JTextField. How to I get the default focus on the first Component on the JInternalFrame. Thanks Sri
Is your JFrame using a JDesktopPane? it should. this class has a method setSelectedFrame(JInternalFrame). this will activate the given internal frame. but I think, the default behaviour is that the newly opened JInternalFrame gets the focus. and normally (my experience) the first textfield gets the focus inside the focused frame.
you can only request focus after the frame is really visible on the screen. any requests before that won't have effect. if you don't know when this is, attach an ancestorlistener to the frame and catch the event 'ancestorAdded'.