• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help with action listeners and events

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic