Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: CardLayout(...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 16017 of 16590
Post > Topic >>

Re: CardLayout() not working

by michael.miceli88@[EMAIL PROTECTED] Apr 24, 2008 at 08:24 PM

On Apr 24, 4:11 pm, "A. Bolmarcich" <agge...@[EMAIL PROTECTED]
>
wrote:
> On 2008-04-24, michael.micel...@[EMAIL PROTECTED]
 <michael.micel...@[EMAIL PROTECTED]
>
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.

Thank you!  This solved my problem.  I didn't see that because
Netbeans dealt with it for me!
 




 4 Posts in Topic:
CardLayout() not working
michael.miceli88@[EMAIL P  2008-04-24 12:18:47 
Re: CardLayout() not working
"A. Bolmarcich"  2008-04-24 16:11:34 
Re: CardLayout() not working
michael.miceli88@[EMAIL P  2008-04-24 20:24:36 
Re: CardLayout() not working
michael.miceli88@[EMAIL P  2008-04-24 20:34:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 17:08:14 CST 2008.