JCheckBox is the Java Swing implementation of a check box, an item that can be selected or deselected, and which displays its state to the user.
Questions tagged [jcheckbox]
613 questions
0
votes
1 answer
CheckBox in jTable?
I've added a checkbox to rows on my table, but unfortunately I'm unable to select/deselect them.
I'm using an own Table Model that I got on internet.
Table Model's code:
import java.util.ArrayList;
import…

Matheus Cirillo
- 133
- 2
- 9
0
votes
0 answers
Java: JLabels not appearing/JCheckboxes appearing and dissapearing
I have been working on a program to store Records on students in Java. If I try to create a Record, the first one works exactly as planned. However, when I try to create the second one, only the Checkbox appears, and it will disappear and reappear…
0
votes
1 answer
Swing JButton is glitching with JCheckBox focus state
I have a JPanel set with the Windows Look and Feel. I have 3 JCheckBoxes, including 2 disabled ones which don't interfere with this problem. However, the non-disabled one is glitching with the JButton I have later in this JPanel:
The JCheckBox…

Momo
- 3,542
- 4
- 21
- 34
0
votes
1 answer
JCheckBox to display and perform functionality in JList
I am trying to get a JCheckBox to display on a line that is in the multiple select JList and still perform its functionality.
Right now if I add the JCheckBox as an element it just prints its toString format.
Help/ideas?

Bryan
- 11
- 2
0
votes
2 answers
Keeping Track of Every Time that a Checkbox is checked and unchecked
I have most of my java application done already, so I am now logging all user activity. One thing I want to keep track of is whenever one of my checkboxes is checked and unchecked. I am able to read at the end if the object is checked or unchecked,…

drake
- 259
- 4
- 17
0
votes
1 answer
Swing Outline with Checkbox in node column
I am creating an JOutline that has rooms, and inside each room has multiple products. You can select an individual product and hit details, but I also need to be able to select check boxes next to multiple products using a checkbox.
I am…

Kyper
- 1
0
votes
1 answer
How to hide elements with in a JComboBox?
Say I have a JComboBox which contains elements that are in a vector...
public class Shade(){
//code for creating panels etc and other components/containers
JCheckBox primary = new JCheckBox("Primary", false);
…

RamanSB
- 1,162
- 9
- 26
0
votes
2 answers
Creating an object in a for loop, and trying to access it elsewhere
I am trying to create a program to shuffle music. I have already gotten all the songs imported, and now I am trying to create a ``JCheckBox for each song. I have a for loop that creates these checkboxes, but I need a way to test if the box is…

user4775991
- 127
- 2
- 14
0
votes
1 answer
JCheckBox List error?
I'm coding an enigma machine in java, and when the program launches, I have a JOptionPane appear with 5 JCheckBoxes for the user to select which rotors to use, and in which order.
My problem is, they get added to the popup, but they aren't actually…

John Agapeyev
- 3
- 3
0
votes
1 answer
Interesting Binding issue, between two GUI components
I am faced with the following problem:
I have a JCheckbox, with an associated JComboBox. (Well, its only associated in the fact that it sits next to each other horizontally on the tab, & also, the naming convention is that the first couple of…

Harriet
- 1,633
- 5
- 22
- 36
0
votes
0 answers
How to check multiple checkboxes in a JTable?
So I have this table:
table = new JTable();
Which models my model: table.setModel(model);
Inside I have a column called CheckColumn which has only CheckBoxes.
The thing is that if I check one box, it checks it and if I want to check another one,…

Alex
- 357
- 2
- 15
0
votes
2 answers
Components in JList are Hidden by White Square Thing Until Clicked
In a project I've been working on, I noticed that all the JList items in my JScrollPane are hidden until the JScrollPane/JList has been clicked. The weird part is it's not completely covered. There's this white box with a transparent border that…

ColonelHedgehog
- 438
- 3
- 18
0
votes
0 answers
Adding an Icon to a JCheckBox causes the checkbox not to be displayed
The title says it all. I'm attempting to add a checkbox with both text and an icon displayed next to the checkbox. Here is my class code:
public class MyDialog extends JDialog
{
public MyDialog(Dialog owner, String title)
{
…

wickstopher
- 981
- 6
- 18
0
votes
1 answer
How to set cursor hand/pointer to JCheckbox?
Is there a way to set cursor (hand/pointer) to JCheckbox while mouse is over it (hover)?

Martin Ille
- 6,747
- 9
- 44
- 63
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