• 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

unchecking and freezing a radio button

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im creating airline seating reservation...

The airplane has 13 rows with 6 seats in each row. rows 1 and 2 are first class rows 3 to 7 are business class and rows 8 to 13 are economy class. I prompt the user to what ticket type he/she has.
and also the desired seat.

And i wanted that when he click the chosen seat and submit it. the radio button will freeze or will not remove...

and also i wanted to clear the checked rad.button. if the user click the reset button.

this is what ive done so far.

i already did the reset button. it resetting the whole program. but... my problem is the checked rad.button is not turning into normal state or will unchecked.
*sorry for my bad english :*( **
123.png
[Thumbnail for 123.png]
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please can you show the relevant code by cut and pasting the code into your post (remembering to UseCodeTags (← click))
 
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And it would help to you, if you'd keep all those related buttons in three different containers, so you wouldn't need to disable (later enable) each button separately, but instead you could disable whole container with one line of code.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:... you wouldn't need to disable (later enable) each button separately, but instead you could disable whole container with one line of code.


You didn't test that, did you? ;)

There is a way to do that using Rob Camick's Disabled Panel.
 
Liutauras Vilda
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:You didn't test that, did you? ;)

No, I didn't test it on AWT, but I did on JavaFX 8, and it worked But you are right, I likely mislead OP without testing it, luckily you putted us on a right track, so OP knows the right solution to follow
 
Rancher
Posts: 1093
29
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am inferring from your wording of your post that the selected button moves along the row as another is clicked, and that is not what you want because they are all supposed to be independent seat locations.

Don't add the button to a button group leave them all unassociated, so they do not interact with each other.
 
reply
    Bookmark Topic Watch Topic
  • New Topic