Problem with CardLayout and Panels

I am almost finished with this application I am writing, using swing components. I use a card layout to navigate through multiple JPanel objects I have. I created an object called OutlinePanel that extends JPanel. I have two of these in my application in my panel with the card layout. The first instance of OutlinePanel works great, but the second instance... doesn't work too well. For some reason, the second instance, when I get to it while running the application, does not respond to any of the code I change. I know this sounds crazy, but I haven't found a way to fix it.

So basically it is like this. My first OutlinePanel shows up looks fine, then another panel shows, then it shows the second OutlinePanel. And say I go change some stuff in OutlinePanel (ie the text of a JLabel on it), and I compile. It won't update in the second one, but it does in the first one. I have tried deleting all the class files, but it still does it.

Will someone please shed light on this for me. Thank you!

[1023 byte] By [kory.kirka] at [2007-11-27 9:09:33]
# 1
"How to Use Card Layout" http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html
camickra at 2007-7-12 21:49:42 > top of Java-index,Desktop,Core GUI APIs...
# 2
I know how to use cardlayout...did you read this at all?
kory.kirka at 2007-7-12 21:49:42 > top of Java-index,Desktop,Core GUI APIs...
# 3
post a sample program that demonstrates the problem.just a frame with a cardLayout Panel containing OutLInePanel/someOtherPanel/another OutlinePanel(and outlinePanel doesn't have to have much on it either)
Michael_Dunna at 2007-7-12 21:49:42 > top of Java-index,Desktop,Core GUI APIs...
# 4

> I know how to use cardlayout...

And how am I supposed to know that? You asked a question about CardLayout here:

http://forum.java.sun.com/thread.jspa?threadID=781862&messageID=4446421#4446421

It was also suggested that you read the tutorial. You never responded to say that the problem was solved.

If the problem isn't related to card layout, then why did you mention you are using a card layout?

If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",

see http://homepage1.nifty.com/algafield/sscce.html,

that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

Don't forget to use the "Code Formatting Tags",

see http://forum.java.sun.com/help.jspa?sec=formatting,

so the posted code retains its original formatting.

camickra at 2007-7-12 21:49:42 > top of Java-index,Desktop,Core GUI APIs...