Article View: borland.public.jbuilder.java.swing
Article #489Re: card layout issue
From: dingfelder
Date: Tue, 19 Jul 2005 03:22
Date: Tue, 19 Jul 2005 03:22
26 lines
1789 bytes
1789 bytes
Forget I asked. I misspelled the card panel string. It seems that the card panel does not complain if you call show for a nonexistant card :( Seems like it should throw an exception if you pass it a bad card name`. "dingfelder" <dingfelder_nospam@sirtrack.com> wrote: > >I am having an issue where i create a card layout, and my show metho sometimes does not work > > JPanel cardPanel = new JPanel(); > CardLayout cards = new CardLayout(); > >In jbinit, I do: > cardPanel.setLayout(cards); > cardPanel.add(panel1, "First"); > cardPanel.add(panel2, "Second"); > cardPanel.add(panel3, "Third"); > cards.show(cardPanel, "First"); > >in the code, in the action for a particular button, I do > > cards.show(cardPanel, "First"); > >Why would this show method work at one point in the program but not later?
Technical Details
Message-ID:
<42dc71e9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42dc712b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,910744e288985235 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "dingfelder" <dingfelder_nospam@sirtrack.com> Sender: "dingfelder" <dingfelder_nospam@sirtrack.com> Reply-To: "dingfelder" <dingfelder_nospam@sirtrack.com> Subject: Re: card layout issue Newsgroups: borland.public.jbuilder.java.swing X-User-Info: 202.27.240.6 References: <42dc712b$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <42dc71e9$1@newsgroups.borland.com> Date: 18 Jul 2005 20:22:17 -0700 X-Trace: newsgroups.borland.com 1121743337 207.105.83.66 (18 Jul 2005 20:22:17 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail