Re: Focus Problem when Switching between JInternalFrames
Posted By:
Colleen_Casey
Posted On:
Monday, April 30, 2001 06:11 AM
I found one reason why I was having such problems with my cursor when flipping between JInternalFrames.
It stems from code that is generated by VA for Java. Our JInternalFrames use JTabbedPane. When you drop a JTabbedPane on the JInternalFrame, it creates a panel called Page. We were then dropping our created panels on this Page. Thus, we were creating a panel to hold our panel. So, focus was going to the Page panel and not where we wanted it to be.
We removed the Page panel and redropped our panel on the JTabbedPane. This eliminated about 95% of our problems. The cursor will now appear when we switch JInternalFrames most of the time. It appears that if we type something on a screen, we then get the cursor and focus appearing at the appropriate places. However, if we don't type anything, the focus is in the right place, but the caret isn't showing.
So, everything is better but we still have scenerios where the cursor is not appearing. If anyone has any ideas on how to fix this, please let me know.
Thanks!