Article View: borland.public.jbuilder.java.language
Article #16018setVisible only works after resize
From: Doug Bath
Date: Wed, 07 Apr 1999 00:00
Date: Wed, 07 Apr 1999 00:00
21 lines
1199 bytes
1199 bytes
Greetings I am using JDK1.2 to write an application that has a JSlider and JTextField component. These components visibility is set to false when the program starts and when the user selects an option I make them visible with MySlider.setVisible(true); MyTextField.setVisible(true); However neither component appears untill I manualy resize the the main window. I have tried repaint() on the components and the frame. I have also tried update(), invalidate(), validate() and even setSize(getSize()) and nothing makes the components visible except manualy resizing the frame. I am sure I am not the first person to run in to this so any suggestions would be most appreciated. Doug Bath
Technical Details
Message-ID:
<370B9973.45880842@agt.net>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,e57f8196fbc2f204,start X-Google-Attributes: gidf74b3,public From: Doug Bath <dbath@agt.net> Subject: setVisible only works after resize Date: 1999/04/07 Message-ID: <370B9973.45880842@agt.net> X-Deja-AN: 463710799 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language