• 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

Howto: Listening to both JComboBox and JButton actionPerformed ?

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, hope someone's there over weekend.
I've an applet which uses both a JComboBox and some JButtons. I need to listen to events on *both* components. I prefer *not* to use an inner class because the compiler forces me to declare the combobox as final, like this:

Since BuySellList is declared final, changing buy to sell will not take effect, as tests have shown.
So the question is: how can I force the it to listen to *both* JComboBox and JButtons programmatically, without using inner class ???
Something along this line would be nice, if possible:

TIA :-)
 
achana chan
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
The problem has been resolved.
 
reply
    Bookmark Topic Watch Topic
  • New Topic