Re: CardLayout() not working
- From: "A. Bolmarcich" <aggedor@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Apr 2008 16:11:34 -0500
On 2008-04-24, michael.miceli88@xxxxxxxxx <michael.miceli88@xxxxxxxxx> wrote:
I am trying to get it to where if the user selects new it will change
the panel, but it isn't working at all. Nothing changes, but I know
the event method is getting called, because of a print statment.
[code]
private void jMenuItemNewActionPerformed(java.awt.event.ActionEvent
evt) {
java.awt.CardLayout cl = (CardLayout)jPanelMain.getLayout();
String path = "jPanelPagePageWelcome";
cl.show(jPanelMain,path);
System.out.println(path);
}
[/code]
That is where I try to use the cardlayout. The rest of the code is
below
In the snipped code there were statements like
jPanelMain.add(jPanelPageWelcome, "card2");
jPanelMain.add(jPanelPageNew, "card3");
that added panels with tags "card2" and "card3", but a panel with
the tag "jPanelPagePageWelcome" was not added.
.
- Follow-Ups:
- Re: CardLayout() not working
- From: michael . miceli88
- Re: CardLayout() not working
- From: michael . miceli88
- Re: CardLayout() not working
- References:
- CardLayout() not working
- From: michael . miceli88
- CardLayout() not working
- Prev by Date: CardLayout() not working
- Next by Date: Re: A java program (MyHashTable)
- Previous by thread: CardLayout() not working
- Next by thread: Re: CardLayout() not working
- Index(es):
Relevant Pages
|