Uhhuh. Back again. This time I'am using CardLayout. But because my problem is so similar. I didn't bother making new
thread about it.
So. I have exactly the same problem. But with CardLayout. I have stack of
cards(classes). And I'an unable to call them from the Main class.
Also. I'am not sure how I should modify this SwingUtilities.getAncestorOfClass to be constructor compatible. It would be much more handy if it were in the constrctor.
Eitherway. It doesn't work with the cardLayout as it works with JDesktopPane. I don't quite understand why. Because as I see it. The idea is same.
Here's how it looks at the moment:
And the error message: