Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages
Started by John T. Dow
Mon, 03 Jan 2005 19:31
jTabbedPane focus problem
Author: John T. Dow
Date: Mon, 03 Jan 2005 19:31
Date: Mon, 03 Jan 2005 19:31
24 lines
1869 bytes
1869 bytes
When a particular tab is selected, either with the mouse or programmatically, I want focus to go to the top component on the selected panel. So far I can't make this happen. I've googled and have come up with possible solutions but no success yet. The following almost works. I added code to the jTabbedPane's stateChanged event to request focus for the appropriate jPanel that will be shown for that tab. That panel's focusGained event is successfully triggered. In the panel's focusGained event I added code to request focus for the component on the panel, but that does not work. Someone suggested that the component may not be visible, so do setVisible(true) for it. That doesn't help. I've also tried the componentShown event instead of focusGained for the panel, but no good. Thanks John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads