• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI Labels and Buttons

 
Peter Shipway
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ November 04, 2004: Message edited by: Jeff Bosch ]
 
Peter Shipway
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see if this makes any more sense

 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic