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
2 answers
Dynamically add JCheckBoxes
Is there a way to add dynamically items of type JCheckBox in Java as in JComboBox we use addItem method?

alessandrob
- 1,605
- 4
- 20
- 23
0
votes
2 answers
Related to checkbox in jtable
I am using a table to display data.
I am providing checkbox to each row of a table to perform some operations based on selection. When I did like that, I am able to check multiple rows.
But my requirement is, at any point of time I should check only…

svkvvenky
- 1,122
- 1
- 15
- 21
0
votes
0 answers
Java CheckBox TableCellRenderer bad behavior
I'm having a strange problem with my custom TableCellRenderer for Checkbox rendering, which works correctly on the first line but on the others, it sets un/selected all the checkboxes between first click and second one. Here's the code :
/*This…

user1888438
- 11
- 2
0
votes
1 answer
JCheckBox doesn't trigger isselected
I have a JPanel, which contains a JPanel and a JButtons.
in the inner JPanel I have some JCheckBoxes which are initially selected. I have added an actionListener to my JButtons that check, if each of the JCheckBoxes changed to unselected an action…

Paniz
- 594
- 6
- 19
0
votes
1 answer
problem with Checkboxes in Jtable column
I have a Jtable with 6 columns where i have Check boxes in the 6th Column.I am outing the text in to JTable by using the setValueAt() and getValueAt() methods.For the same Jtable I have Find,Replace and Replace All Controls to find,replace and…

Bharath
- 51
- 2
- 6
0
votes
2 answers
JList containing JCheckBox and a String, with non ctrl click selection?
Been a while since I posted on here, and now I am at a point where I find myself stuck yet again.
For my assignment at uni, we have been asked to create an address book application. It is going well, and it's nearly completed, however one part of…

Relequestual
- 11,631
- 6
- 47
- 83
0
votes
0 answers
Get all selected checkboxes on button click
When I click a Swing button, I would like to get all selected checkboxes. I tried many methods, such as getSelectedObjects() and getStateChange(). Moreover, I tried to call isSelected() in ItemStateChanged. Finally, I tried to call…

Munir
- 51
- 1
- 9
0
votes
2 answers
Unstable program of JCheckbox in JTable
I have a GUI that hasJCheckbox in JTable where the table is populated data with database with help of vector.
I am providing the code below for extracting data from database:
try {
PreparedStatement pre = con.prepareStatement("select * from…

Gowtham Ravichandran
- 15
- 1
- 7
0
votes
2 answers
Nested CheckBox in Java
I want to create a nested checkbox list. If the user checks the main item, all the sub-items under and get checked. If the user checks some of the sub-items, then a blue square appears inside the main items checkbox.
It should look something like…

SeeknInspYre
- 360
- 1
- 3
- 16
0
votes
0 answers
JTable not show checkbox in the boolean column
I have a JTable and I fill it with an Object[][] array. This array contains boolean and String values, but table does not show checkboxes (just true or false).
My code is:
model =
new DefaultTableModel(pinFin, colNames) {
…

user1005633
- 625
- 3
- 9
- 23
0
votes
2 answers
float checkboxes on expand in Swing
I've made a simple GUI with 2 lines of checkboxes. The checkboxes are all the same size. When I maximize the application, they are anchored on the left so it looks a bit out of place.
I would like to have the checkboxes slowly move to the first…

Terence Chow
- 10,755
- 24
- 78
- 141
0
votes
1 answer
Adjusting the space between checkboxes in java swing
I am trying to use gridbaglayout (in windowbuilder pro in Eclipse) to make a gui with checkboxes. My problem is similar to this: stackOverflow:How to reduce space between JCheckboxes in GridLayout but setting the border to empty did not help. The…

mdoc-2011
- 2,747
- 4
- 21
- 43
0
votes
0 answers
Why I cannot change boolean values in the JTable by clicking
I have created my own JTable I wanted it to contain:
JLabel, JColorChooser, JCheckBox in this order in every column, but I have no idea how to add any of these to my JPanel. Furthermore I in the 3rd collumn I added Booleans that are shown as a…

user2398815
- 421
- 1
- 4
- 5
0
votes
1 answer
Storing javascript checkbox(checked/unchecked) result in php mysql error
I am trying to accomplish live checkbox result with checked/unchecked checkbox.
My logic for checkbox works but now I want to store this live checkbox result in MYSQL So when I click on checkbox, result should be stored…

Rahul Deshmukh
- 1
- 2
- 5
0
votes
2 answers
How to Store javascript checkbox result in php mysql
I am trying to accomplish live checkbox result with checked/unchecked checkbox. My logic for checkbox works but now I want to store this live checkbox result in MYSQL. So when I click on checkbox, result should be stored in database same as when I…

Rahul Deshmukh
- 1
- 2
- 5