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

JRadionButton pressed icon

I have a toolbar filled with buttons, and I want these buttons to be radio buttons, or at least respond like radio buttons. The problem that I am having with them is that I want to set an icon to these buttons, but I need the button to indent when…
Raisintoe
  • 201
  • 1
  • 4
  • 11
0
votes
3 answers

radio button use what setter?

My values get it from database (mysql). If in text field, there will be like this : txtMID.setText("" + rs.getString("menu_id")); Are in combo box like this? cmbMCat.setSelectedItem("" + rs.getString("menu_cat")); How about radio button? I think…
enjeru
  • 55
  • 1
  • 9
0
votes
1 answer

changing an image with another when button is clicked and changing jtextarea when radiobutton is selected

so, i'm still a beginners in java and my project is due few days and i'm still stuck in those 2 problems i'v searched a lot and read that it should work but it won't I have an image in the frame and few buttons i want when a button is pressed…
0
votes
1 answer

Returning values from radio buttons, checkboxes

I'm new to Java, and I am having trouble returning values (prices) represented by radio buttons and checkboxes. I've never done this before, so I'm not actually sure where to even begin. Here is what I have: public class Size extends JPanel…
stevanc
  • 15
  • 6
0
votes
0 answers

Why is the isChecked() method not declared?

I try to use the isChecked() method to identify whether a radio button is selected or not, and I get an error saying 'cannot find symbol'; I have imported java.awt.event.* so it's not that! It's probably something stupid but I'm really stuck! if…
JL9
  • 533
  • 3
  • 17
0
votes
2 answers

How to know if JRadioButton is enabled in java

So my argument in my if statement below has to check if my JRadioButton is checked, but for some reason, even if it's not checked, the program still runs. public void actionPerformed(ActionEvent e) { String actionCheck =…
X1XX
  • 141
  • 2
  • 13
0
votes
3 answers

JRadioButton and component changes

I created a JDialog box where it has 2 radio button which will change the JLabel whenever I clicked the other button(for example: Monthly salary when I click the full time button and hourly pay when i click the part time button) So my questions is…
Noah Skull Weijian
  • 129
  • 1
  • 2
  • 8
0
votes
4 answers

Changing the icon of a JButton based on a JRadioButton selection

I have a JRadioButton with an ActionListener but cannot figure out how to trigger an icon change for a JButton in a different panel when it's clicked. The code for both is listed below. The image needs to switch from the left button to the right…
KMKZ509
  • 1
  • 5
0
votes
1 answer

How to set the properties for JRadioButtons and apply to them all?

Hi, I have over 10 JRadio Buttons and there are some properties they all have in common, so instead of writing these properties one by one to each radio button, is there are way to set them once for all? The properties I want to set for all radio…
user3130287
0
votes
1 answer

JRadioButtons and JCheckBox

I have a specific question which I am struggling with so far. I'm working on a specific application where the user can choose insurance options through JCheckBoxes. I have used a ButtonGroup to allow the user to select only one of two insurance…
0
votes
1 answer

How to make Java Swing Radio Buttons unselectable but not greyed out?

I am developing a Java Swing App, and I want to use JRadioButton objects to show state. I don't want the user to have the ability to select them. If I use the button's .setEnabled(false) method, the radio button is greyed out. I don't want the…
user1104028
  • 381
  • 7
  • 18
0
votes
2 answers

Java Sockets: Client and Server. Server not responding when receiving data from a radio button

Hello I need some quick help with this Server/Client socket program I am writing in Java. Everything works as intended when entering standard input on the client side. The server responds with the correct data every time. But when I send data to the…
Maguire
  • 7
  • 2
0
votes
1 answer

How can I change the background color of a jPanel containing JRadioButtons?

I have an java assignment in which I need to have the background color of a GUI change depending on user selected radio buttons listing different colors. My program has a JFrame to hold everything, then 3 JPanels (1 Instruction area, 1 Radio Button…
SirChill88
  • 13
  • 1
  • 3
0
votes
1 answer

Displaying an item from a collection using Jradio button

I been learning about java for some time now and even bought several books to help me along. i am now in at the point in my journey that i want to learn about collections. i am able to use array lists in a very basic ways but i would like to…
0
votes
2 answers

How to select a JRadioButton from ButtonGroup?

I try to do an image creator program in java (with squares/circles/etc) I have a few JRadioButtons in a ButtonGroup that symbolizes my program's "mode" (if I draw a circle, something else/if I move the objects). When I click on different modes, the…
user3450862
  • 379
  • 1
  • 6
  • 22