File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes GUI Design Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "GUI Design " Watch "GUI Design " New topic
Author

GUI Design

Latha Ganesan
Greenhorn

Joined: Feb 27, 2001
Posts: 12
Hi all,
I just wanted to discuss a few issues about GUI here...
I am using JFrame as my MainFrame and have two JPanels, one for selecting the aiports and another for displaying the flight details according to the selected airports and add relative panels according.
What I found is the refrsh is not proper, that is, after adding panel1, if the user clicks on 'get details' button and I add panel2(details) I still can see the panel1(some parts) and if I minimise the window and maximise it again I see panel1 fully. How do I get rid of this. I use MainFrame.setVisible(true) to show the second panel. Is that wrong? Should I use a different way. Where can I find related info?
First of all, is this approach ok?
Thanx
Latha.
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
It sounds that you need to set JPanel#1 visiblity to 'false' before seting the Jpanel#2 visibility to 'true'.
hope this will help
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
You might also try updateUI()
With Respect,
Matt
Latha Ganesan
Greenhorn

Joined: Feb 27, 2001
Posts: 12
Hi!,
Thanx a lot, JPanel.setVisible(false) works...
Latha
 
 
subject: GUI Design
 
Threads others viewed
enabling & disabling menuitems
Help needed with layout of buttons
What is the best way to create GUI components- in-line, methods, inner classes or separate classes
JInternalFrame
Problem with tabbed panes
developer file tools