aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes GUI Labels and Buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI Labels and Buttons" Watch "GUI Labels and Buttons" New topic
Author

GUI Labels and Buttons

Peter Shipway
Ranch Hand

Joined: Mar 25, 2004
Posts: 71
Hey yo,

Aparently I have been doing text-based java for a bit too long and im rusty on the GUI side, im making a really simple archery game with the target on the top of the window and the shots, score and restart button on the bottom. I have the target done fine but I just cant remeber how to atucally add labels and buttons :S. Below is my code so far:


I feel like a complete idiot because I just cant remember what to do, i know it has something to do with creating a panel but other than that im lost, any help would be greatly apreciated.
[ November 04, 2004: Message edited by: Peter Shipway ]
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805

[ November 04, 2004: Message edited by: Jeff Bosch ]

Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Peter Shipway
Ranch Hand

Joined: Mar 25, 2004
Posts: 71
Hey yo,

Thanks for that, I have another problem now however How do i add the Content pane to the atucal window? As i dont think its possible to add the shapes to a content pane (or not the way im doing it) here is my new code:



Again any help would be great
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
see if this makes any more sense

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
You might get more help if you ask this question at the Swing / AWT / SWT / JFace forum. That is the place to discuss GUI programming around these parts.

Layne

p.s. Maybe an admin can just move this thread for you.


Java API Documentation
The Java Tutorial
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1821

Moved.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: GUI Labels and Buttons