Hi all,
I've got a doozy, least I think it is hopefully there is an insanely simple fix.
Here is the setup. I have an application which contains a JTabbedPane with two tabs. The first tab is a search area with a JTable for results and lots of little fields and buttons for buliding your search.
The second tab contains a JDesktopArea which I've extended to do the scroll bar thing. Now, here is where I am confused. In VA which runs 1.2.2 everything works just fine but in JDK 1.3.1 which the company is using I get the following problem.
1. If I highlight text ANYWHERE other than in one of the internal frames and use the copy menu item or copy button the copy occurs just fine. However! If I have text selected in an internal frame and try the menu item it gives an error that the selected component is not a text field. (However the button works for some odd reason.)
Through debugging I've found this:
When text is seleced in teh JInternalFrame and menu item is then triggered events happen like this:
Menu Item gains focus
Menu Item action is run
Menu Itme looses focus
When the text is selected anywhere that ISN'T a JInternalFrame the events go like this:
Menu Item gains focus
Menu Item looses focus
Field with selected text regains focus
Menu Item action is run.
2. This one is even stranger. I start the application and open a new JInternalFrame. If I do this I can type in a text field BUT I can not highlight text with the mouse, i can do it using the SHIFT and arrow keys but not the mouse, I also can not use the mouse to scroll the JInterlaFrame's scroll bar. However if I swtich focus to another frame and then back again everything works as its supposed to from then on out until the program is closed.
I'm thinking the problem has to be something with how focus is handled with the JInternalFrames and that 1 and 2 may be relate? I've tried just about everything I can think of with now luck, anyone have an ideas?