• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

GUI Design

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds that you need to set JPanel#1 visiblity to 'false' before seting the Jpanel#2 visibility to 'true'.
hope this will help
 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might also try updateUI()
With Respect,
Matt
 
Latha Ganesan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!,
Thanx a lot, JPanel.setVisible(false) works...
Latha
 
What's brown and sticky? ... a stick. Or a tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic