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
-1
votes
1 answer

Inserting JPanel into JOptionPane and retrieving data

I would like to ask you how can I insert JPanel into JOptionPane and retrieve all the information from these JTextFields later on. For example I have something like this: JPanel jp = new JPanel(); jp.setLayout(new GridLayout(0,1); JPanel up = new…
Yoda
  • 17,363
  • 67
  • 204
  • 344
-2
votes
1 answer

Start event when radio button is deselected

So, first you selected it and it does the things I told it to do, and then you deselected it, wanting to start an event, but only when it first has been selected.
Gerald
  • 79
  • 6
-2
votes
1 answer

Java - Shuffle Buttons INSIDE a ButtonGroup

In additoin to my previous question: Java - using a IsSelected function in radioButtons and JPanel I have a program that adds buttons to button groups and panels. The problem - shuffling the buttons within the button group. I am familier with the…
Assaf
  • 1,112
  • 4
  • 14
  • 35
-2
votes
1 answer

thread.sleep not doing what is supposed to

So, the program is for school and i am having some problems, the basic premise is to have to user choose shape, size and colour, then draw the shape or animate it to move across the screen. My programs works fine without the thread.sleep (it moves…
-2
votes
1 answer

java radio button, updating a JLabel

I am trying to make this code so that it adds or subtracts from the initial value presented each time you click submit. I have searched multiple threads on how to complete this and I haven't come across any that are really clear. A push in the right…
-2
votes
1 answer

how to check if 2 Jradiobutton are selected?

how can i check is 2 jRadio button are selected and then show a new frame showing the new operation in the new frame ,the problem in my code is that is show the question 1 even if non of radio button is selected the program should check id addition…
-2
votes
2 answers

Can JRadioButtons be stored in map

I was wondering if you could add JRadioButtons to a HashMap as a key and Color as value such as: Map <"JRadioButton, Color"> store = new HashMap <"JRadioButton, Color"> store.add(new JRadioButton("FF0000"), Color.red); Then add an action…
-2
votes
1 answer

didn't understand action listner of radio buttons

when i click adjacent two radio button then a line drawn between these button i put conditions in my code that line only will draw when two horizontal or vertical radio button selected else it show a error message ........... it works for me but if…
-6
votes
1 answer

My Program just doesn't work and i don't know why?

This is my code for a school project, i have to make a list of toppings to put on a Pizza and also Choose a Size. Every is okay, when I tick Sausage, Ham, Pepperoni 1$ is added, When I tick Pineapple, BlackOlives, Onion, GreenPepper 0.5$ is added.…
-7
votes
1 answer

Activating JButton when radio button is enabled?

I want to set my JButton enabled only when I check one radiobutton in my radiobutton group. How can I do that?
Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73
1 2 3
29
30