Trouble with CardLayout (I think)  
Author Message
jerseycat10





PostPosted: 2004-1-9 3:03:00 Top

java-programmer, Trouble with CardLayout (I think) I have an application that looks like this:

--------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
--------------------------


The thing on the left is a JPanel with Buttons and other things on it.
The thing on the right is a JPanel with a CardLayout. I am having a
problem with the various cards in the CardLayout receiving mouse
clicks. As of now, I only have 2 cards in my card layout. One is a
JEditorPane, and one is a Java X Server application. The applications
which I display on the X Server in the one card don't seem to get
keyboard input. The html I am displaying in the JEditorPane doesn't
respond to hyperlinks (Yes, I did make it a hyperlinkistener). The
code in question seems to work fine in sample applications that don't
use the CardLayout. Any ideas?

Thanks!

AJ
 
Andrew Thompson





PostPosted: 2004-1-9 21:03:00 Top

java-programmer >> Trouble with CardLayout (I think) "AJ" <email***@***.com> wrote in message
news:email***@***.com...
....
| ...The
| code in question seems to work fine in sample applications that
don't
| use the CardLayout. Any ideas?

Try to add both of the Panels into a GridLayout
instead of CardLayout, and see if _that_ works.
If it does, it strongly indicates the CardLayout is
the problem..