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
3 answers

How to disable a JRadioButton inside a ButtonGroup in Java

i have four JRatioButtons inside a ButtonGroup in Java. The two first are enabled and the other two are disabled. If one specific JRatioButton is selected i need to enable the two disabled JRatioButtons. Im trying this to find the state of the…
Hannibal
  • 15
  • 1
  • 1
  • 7
0
votes
2 answers

setComponentOrientation does not have effect on form designer

I have right to left JFrame in swing with netbeans. there is radio button in it which is setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT). When I execute the program the orientation is fine. but in GUI builder it shows like this: Is this…
Majid Azimi
  • 5,575
  • 13
  • 64
  • 113
0
votes
1 answer

Adding RadioButton Group to JTable

I am designing an attendance system and for this I am using a JTable For listing the students and marking the attendance against their names. I added a RadioButton Group in a Jtable column, My code of this is as follows:- JTable jTable = new…
Deepak
  • 335
  • 1
  • 7
  • 21
0
votes
3 answers

One JButton to call member functions based on user input

Given a GUI app, a user will select one of the two radio buttons, JRadioButton a, or JRadioButton b. Depending on his selection, he will enter different inputs. However, to calculate a formula, he will click on a regular button, JButton c. However,…
user1560322
0
votes
3 answers

How to reload JDialog in Java?

Hello I've problem in reloading JDialog. I've 2 JRadioButton: Not defined Defined in first row When I click a button, a dialog will appear, it's content will depend on the radio button. If I choose the first one it will display "Hello World!", but…
Fahmi Ramadhan
  • 287
  • 2
  • 4
  • 11
0
votes
2 answers

Adding jRadioButton into jTable

I am trying to add jRadioButton into jTable. I used the given code private class CustomCellRenderer extends DefaultTableCellRenderer { /* (non-Javadoc) * @see…
Luna
  • 956
  • 4
  • 15
  • 28
0
votes
3 answers

Passing JRadioSelection to an ActionLIstener class

For my application, I created two JRadioButton grouped into a "selection" ButtonGroup. I added an ActionListener called "SelectionListener." When I check if my RadioButton is selected using isSelected(), it appears that my selection is not getting…
Huy
  • 10,806
  • 13
  • 55
  • 99
0
votes
3 answers

Jquery How to sum in a radio button

I'm trying sum many values from radio buttons, but I'm with some problems in my logical thinking, I put my source code here to a better visualization. so, for exemplo I have the product_price = 9.00 and a radio = 2.00 and another radio, radio2=…
Nielsen Rechia
  • 649
  • 1
  • 10
  • 20
0
votes
3 answers

basic radiobutton issue - java

package pkg411project; import javax.swing.ButtonGroup; public class CrudMain extends javax.swing.JInternalFrame { public CrudMain() { initComponents(); } @SuppressWarnings("unchecked") private void…
Nidhin_toms
  • 707
  • 4
  • 18
  • 29
-1
votes
1 answer

Get User Input and show it on field - Java

I am new to Java and want to start with making simple user input fields without MySQL. Until now I got two problems that I can't solve. First of all, how to get inputs from JCheckBox and JRadioButton? And I get these user inputs in console, but how…
KORENS
  • 13
  • 4
-1
votes
2 answers

Swing: Intercept click on a JRadiobutton

I want to intercept the click on a JRadioButton in a button group. More precise: When JRadioButton A is chosen and the user clicks on JRadioButton B, I want to show a Yes/No-option pane. Only when the user clicks "Yes", radio button B be will be…
felix_w
  • 15
  • 7
-1
votes
1 answer

NumberFormatException: For input string: "Regular (Php 100)"

The program is supposed to compute the integer indicated for the radio button, checkbox, and combo box, but it always returns an error when I submit it. Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string:…
-1
votes
1 answer

Radio button .isSelected() method doesn't return right response

I am creating a basic Java GUI trivia game where one selects a radio button, and clicks on a button. The program then checks if the correct radio button was selected. It displays a message based on what radio button is selected. For some reason,…
-1
votes
1 answer

Radio buttons do not display as expected

Whenever I run this code the radio buttons display correctly until I tab in or hover into the window, then it only shows one of the radios and the only way I can see the others is by hovering over them. Why do the radio buttons not display until I…
-1
votes
2 answers

Receive the result of radio group button selection from confirmed JOptionPane

I have made a panel which contains two radio groups of buttons. You can find the result of JPanel in the image below. Then I used the below code to add this panel to a JOptionPane box: OptionsForDisjunctionNodes optionsForDisjunctionNodes=new …
Sal-laS
  • 11,016
  • 25
  • 99
  • 169