• Post Reply Bookmark Topic Watch Topic
  • New Topic

unchecking and freezing a radio button  RSS feed

 
mark patindol
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • 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]
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • 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))
 
Liutauras Vilda
Marshal
Posts: 4657
320
BSD
  • Mark post as helpful
  • send pies
  • 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.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • 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: 4657
320
BSD
  • Mark post as helpful
  • send pies
  • 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
 
Les Morgan
Rancher
Posts: 768
19
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!