• 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

Multiple radio button groups in a single panel

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have 4 radio buttons grouped into 2 button groups. All the buttons in a group are placed in the seperate panel. (thus I have 2 panels each containing 2 radio buttons of the same group). Finally I also have a panel on which I have placed the above formed two panels.
Diagramatically like the following, with 2 buttons inside each of the inner boxes.
--------------------
| |-----| |-----| |
| | | | | |
| |-----| |-----| |
----------------------
Am using the itenlistener interface to find which button was clicked. Object source = ae.getItemSelectable(); I print out source and saw the text of the radio button selected. For the first group(new,old)bts, the text 'new' and 'old' appear correctly when the appropriate button is pressed.
However in the second group (open,secure), when I select 'open' & 'secure' the source displayed shows the text as 'secure'. Am pretty sure that I have not made any funny mistake like wrong labelling.
Could someone give me an idea why this is happeneing ?
Frustrated,
Aravind.
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any code to help us out?
 
Aravind Elango
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi chris,
Thanks for responding. I figured the problem was with the itemlistener. Learnt that Itemlistners are expecuted for deselected button as well.
Thanks,
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic