Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Gui program with multiple panels

 
Jane Doner
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im writing a gui program with three seperate panels. The first panel takes three user input sides and displays the information in a textfield. The second panel then takes that information and displays the characteristics and total perimeter of the Triangle objects. The first panel I have works fine but I cant figure out how to add the second panel. I attempted to just add the border outline of the panel and its not displaying at all. If anybody could point me in the right direction it would be much appreciated. This is what I have so far

 
Campbell Ritchie
Marshal
Posts: 52636
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I shall move this question to our GUIs forum.

What sort of layout are you using? If you don't specify layout and locations you may end up with several components being added to the same location and you will only see one of them. Or components may be added beyond the bounds of the GUI where you can't see them. Are you adding things to a panel? Have you found out what sort of layout a panel uses as a default? Have you tried enlarging the display with your mouse?

Please look in the Java® Tutorials; they should help you a lot.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jane Doner wrote:Im writing a gui program with three seperate panels. The first panel takes three user input sides and displays the information in a textfield. The second panel then takes that information and displays the characteristics and total perimeter of the Triangle objects. The first panel I have works fine but I cant figure out how to add the second panel. I attempted to just add the border outline of the panel and its not displaying at all. If anybody could point me in the right direction it would be much appreciated. This is what I have so far

Sounds like a job for CardLayout
 
Michael L Smith
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about GridLayout?
 
Always! Wait. Never. Shut up. Look at this tiny ad.
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!