Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: clusardi2k@aol.com Newsgroups: comp.lang.java.programmer Subject: Re: jLabel setVisible(true) Doesn't Work Date: Tue, 7 Aug 2012 15:22:19 -0700 (PDT) Organization: http://groups.google.com Lines: 17 Message-ID: <75d52d16-d119-4cee-a9b3-426de8ccbb5d@googlegroups.com> References: NNTP-Posting-Host: 173.71.154.51 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1344378139 28212 127.0.0.1 (7 Aug 2012 22:22:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Aug 2012 22:22:19 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.154.51; posting-account=r24XpwkAAABfAJg5TJRsTScS4AL5MjOT User-Agent: G2/1.0 X-Received-Bytes: 1974 Xref: csiph.com comp.lang.java.programmer:17308 On Tuesday, August 7, 2012 3:33:29 PM UTC-4, markspace wrote: Your label has to be inside another component (a container) to be visible.= Changing a local variable will never work. Even changing an instance field= won't work unless you've specially defined your own component somehow. Mos= t Swing components are also containers. However normally you use JFrame and= JPanel as your containers. Call the add method, or use the GUI layout tool= to just drag and drop components onto one.=20 Does anyone have a simple working project of this: (1) It has a form with a JPanel dragged from the swing control palette, (2) In the JPanel a Jlabel is dragged from the swing control palette. (3) The jlabel is set to invisible at the start of the project. (4) The project becomes visible when a button is pressed. (5) The project becomes invisible when a button is pressed. Thanks,