Questions tagged [jradiobutton]

JRadioButton is the Java Swing implementation of a radio button.

JRadioButton is a Java implementation of a radio button -- an item that can be selected or deselected, and which displays its state to the user. Used with a ButtonGroup object to create a group of buttons in which only one button at a time can be selected.

Relevant tutorials:

445 questions
0
votes
2 answers

How can I keep the bubble from a JRadioButton when adding an ImageIcon?

I am improving a rock, paper, scissors program I created using swing, and now I'm adding ImageIcons for each JRadioButton. I imported and added rock, but I cannot seem to find a way to keep the bubble that is shown next to the text. When I add the…
Connor Greene
  • 27
  • 1
  • 9
0
votes
1 answer

Problems with Buttons

I'm having a problem with radiobuttons and adding them to my gui layout. I am trying to load a group of buttons to my panel, "orderPanel," and position the group next to the description header and text area space. I am trying to position it below…
Clinton Scott
  • 45
  • 1
  • 9
0
votes
3 answers

how to select JRadioButton depending on button

see my problem start form this piece of code i add all the addActionListener for the button but when it come to the Radio button it use addItemListenet but i implements ActionListener only how i will implements ItemListener so i can set Law when…
isslam akkilah
  • 418
  • 1
  • 11
  • 23
0
votes
1 answer

Handle RadioButton events after button clicked

help, my questions are: why isn't itemStateChanges triggered, I tried to put it in the inner class ButtonHandler and also in RadioButtonHandler Im having trouble with it, what is the right way to do it? I want to trigger and check the marked…
Yevgeni
  • 1,533
  • 17
  • 32
0
votes
0 answers

Using Radio Buttons to set labels in Java

So for class I'm suppose to make a Celsius to Fahrenheit converter GUI. With that said, it's a pretty simple and easy program to create. I want to do more with it though. What I want to do is have one window that changes depending on which radio…
Opzoleet
  • 38
  • 1
  • 8
0
votes
2 answers
0
votes
1 answer

JFrame layout with radio buttons

This is my code: frame2 = new JFrame("Confirmation"); frame2.setLayout(new BorderLayout()); JRadioButton y,n,c; panel = new JPanel(); ButtonGroup buttonGroup = new ButtonGroup(); y = new…
Santino 'Sonny' Corleone
  • 1,735
  • 5
  • 25
  • 52
0
votes
2 answers

Adding 2 groups of JRadioButton to be corresponding the same

I am doing a simple GUI painting box program. However, I have a problem with adding 2 similar separated groups to be corresponding in the same way. I mean when I click the JRadioButtonMenuItem Line, then the JRadioButton Line below also has to be…
0
votes
1 answer

How to know java JRadio button is unselected

I have to make three radio buttons. On selection of the third radio button I have to show some text boxes. I also have to immediately remove the text boxes when the third radio button is unselected and any one of the other two is selected. I am…
Akshay
  • 1,735
  • 6
  • 21
  • 29
0
votes
1 answer

Java: How to change an image in an image panel as determined by which radio button is selected

I'm a java beginner, and my java skills suck on this. In my jframe, i have this jpanel(below) which draws the image. I want the image changed whenever a radiobutton(in another frame) fires an ItemEvent and click something like a save button that'll…
FartVader
  • 143
  • 1
  • 3
  • 13
0
votes
1 answer

change the color of radiobutton's CIRCLE background

I'd like to ask about quite a trivial thing if you don't mind. Is there a method under JRadioButton class that allows changing of color of the background of the "circle" that is ticked in the radiobutton, not that of the radiobutton itself. i want…
FartVader
  • 143
  • 1
  • 3
  • 13
0
votes
2 answers

JradioButtons unchecking

I have a menu bar with two menus on it. On one of the Menus I have difficulities Easy,Medium,Hard. When clicking on several of these radiobuttons they all stay checked. My problem is: How do I uncheck them and only make sure that one of the buttons…
User999
  • 21
  • 5
0
votes
2 answers

Input verifier between textfields and radio buttons

I set input verifier to my two text fields and i want that my radio buttons should be Inactive until two text fields being verified. (User should can not select any from radio button, until text fields verify.) How inactive JRadioButtons until…
Sajad
  • 2,273
  • 11
  • 49
  • 92
0
votes
1 answer

Java beginners GUI Radio Buttons

I have been working on learning Java and I am having trouble with this program. It is suppose to just be two radio buttons(male/female) then show a message dialog about which you chose but I keep getting an error. Here is my code: import…
ajk4550
  • 743
  • 2
  • 11
  • 25
0
votes
1 answer

JRadioButton setMnemonic broken Java 1.5

I am attempting to convert a short JComboBox to a JRadioButton group. When defining the radio buttons, it is telling me it doesn't like my setMnemonic syntax. My code: public JRadioButton mailRadio = new…
Travis
  • 1,044
  • 1
  • 17
  • 36