Article View: borland.public.jbuilder.java.language
Article #15927Need help on disappearing Swing controls
From: Robert J. Muller
Date: Fri, 16 Apr 1999 00:00
Date: Fri, 16 Apr 1999 00:00
17 lines
1462 bytes
1462 bytes
I'm developing a survey application that presents a question and a control for entering a response. I display the question in a JTextArea contained in a BevelPanel which is in turn contained in a JFrame. I want to have several basic controls in the BevelPanel that the frame shows and hides depending on the question. I therefore add the controls (a couple of JComboBox's) to the BevelPanel in the jbInit() method and use setVisible(false) to hide them. I then make them visible in the method that displays the relevant question and make them invisible after processing input. My problem: the setVisible(true) doesn't make the control appear. If I remove the initial setVisible(false), then the control appears continuously and disappears after processing input (when I issue the setVisible(false). Can anyone suggest why making the control invisible in jbInit would make it impossible to show it later? --Bob Muller
Technical Details
Message-ID:
<371768EA.14972F1D@valuestar.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,6c0a42b7722cc186,start X-Google-Attributes: gidf74b3,public From: "Robert J. Muller" <bmuller@valuestar.com> Subject: Need help on disappearing Swing controls Date: 1999/04/16 Message-ID: <371768EA.14972F1D@valuestar.com> X-Deja-AN: 467190875 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: ValueStar, Inc. Mime-Version: 1.0 Reply-To: muller@computer.org Newsgroups: borland.public.jbuilder.java.language