It's not a secret anymore!*
The moose likes Swing / AWT / SWT and the fly likes GUI problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI problem" Watch "GUI problem" New topic
Author

GUI problem

Geoff Vurel
Greenhorn

Joined: Jan 14, 2009
Posts: 12
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

Joined: Oct 27, 2005
Posts: 19760
    
  20

You never show the first frame, only the second.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Geoff Vurel
Greenhorn

Joined: Jan 14, 2009
Posts: 12
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

Joined: Jun 09, 2003
Posts: 4632
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: GUI problem