This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI problem

 
Geoff Vurel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my code compile but somewhere I made a mistake. When I run my app the only thing that shows is the "Launch another frame" window. Can someone help me figure out why?

 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You never show the first frame, only the second.
 
Geoff Vurel
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob.

I still have something wrong hopefully you or someone can assist. I don't get the "about" button to show in my frame. I want that button to show and when I click it open frame2.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you add the button here
frame.getContentPane().add(about);

then add it again to frame2
frame2.getContentPane().add(about);

a component can have only one parent, so it is removed from the first frame
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic