• Post Reply Bookmark Topic Watch Topic
  • New Topic

need help with action listeners and events

 
James Blarney
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am building a pizza ordering app for a homework assignment. The layout looks fantastic but as for the functionality, that is a different story.
My objective is achieve an output similar to the one below. You pick your options, with radio and check boxes, then click process order. The receipt then gets displayed in the box below.


I am trying really hard to get down the language for actionlisteners and events. Could someone point to each of these elements and tell me specifically what the element needs?
Does the text box need a listener?
Does it need to listen to the process order button?
Do the radio buttons need a listener to listen to themselves being clicked?

Any thoughts would be appreciated.
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the Swing tutorial. It has examples on how to use each Swing component and well as example of how to write listeners.

If you need further help then you need to create a SSCCE (Short, Self Contained, Compilable and Executable, Example Program), that demonstrates the incorrect behaviour.
 
James Blarney
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:Read the Swing tutorial. It has examples on how to use each Swing component and well as example of how to write listeners.

If you need further help then you need to create a SSCCE (Short, Self Contained, Compilable and Executable, Example Program), that demonstrates the incorrect behaviour.


Can I post a kenai link? is that acceptable SSCCE?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umm.. what is a Kenai link?

If you follow the link which Rob posted you will notice that the whole intention of sscce is
1) Code which is short and thus easy to follow.
2) Code which demonstrates the problem you are facing. Take out all the other fluff.
3) Code which people can download, run in their environment and try and help you figure out what the problem is.
4) Many times, while generating sscce, the users realize what the problem is and arrive at a solution!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!