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
JAVA Programming CheckBoxes to MySQL
I have four JCheckboxes.
I can select all four options, or three, or two or at least one.
How do I get the values stored in one single column of the MySQL database?
See my code below:
String al = "";
if(foreign.isSelected()){
…

yetin
- 61
- 11
0
votes
1 answer
Entering various values in mysql from various JCheckboxes in JAVA
I have the following 4 JChecboxes in my form. If the user clicks all the four, or any choices of JCheckboxes how do I save the values from the checboxes in mysql database in one sigle column? When I click my Add button, it should stored all the…

yetin
- 61
- 11
0
votes
1 answer
Java: JCheckBox won't stay checked with ItemListener
Ok, I'm new to listeners (still learning the language), and this is my first full-scale attempt to implement them (ie more than just a practice problem in a textbook).
So far, everything is working fine except one big bug: the checkboxes don't stay…

craigmiller160
- 5,751
- 9
- 41
- 75
0
votes
0 answers
How to add JCheckBox beside a String in JList and allows it to select and open multiple files stored in a folder without the use of ctrl key?
I am still quite new to Netbeans interface but I would like to ask for help with some coding. My intention is to make a GUI where it would be populated with the files that are stored in the specified directory which I have succeeded.
However, now I…

user3669019
- 13
- 5
0
votes
2 answers
Getting CheckBox input from JOptionPane
I am making a swing app and I have am having trouble getting the input from my check box which I have embedded inside a JOptionPane
At the moment I click a button (comparison) which loads the JOptionPane and I select the two animations to run.
I am…

NeptuneGamer
- 123
- 1
- 12
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…

Nilesh Bhunjun
- 41
- 9
0
votes
1 answer
Java JComboBox icon
Displaying data in a JTable. One column serves as a field Checkbox. The problem is that instead of the icon appears in the display ChceckBox true / false. How do I fix this?
Add data:
private DefaultTableModel headermodel = new…

lukassz
- 3,135
- 7
- 32
- 72
0
votes
1 answer
Select all JCheckBox in JComboBox
I have JCheckBox in JComboBox code :
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CheckCombo implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
JComboBox cb =…

koubouou
- 3
- 3
0
votes
0 answers
How to check 'selected' of an item in JCheckBoxTree after pressing the button
I have a customised JCheckBoxTree which its code is taken from this source.
So I want to have access to the status of each CheckBox of this tree. For example, I want to set an item of the tree as 'SELECTED' by pressing a button. I think I need to…

Alex
- 255
- 2
- 5
- 10
0
votes
2 answers
Swing remove JTexField and JLabel
I have a JTable 2 columns, column name and check-box. If the user clicks the check box next to the name of the column that creates a new field for data entry. I wish the unclick check box input field has disappeared.
How can I do that?
My code to…

lukassz
- 3,135
- 7
- 32
- 72
0
votes
1 answer
Implementing JTree nodes with radio/check boxes
I'm trying to achieve an elegant tree representation in which certain types of nodes are displayed as panels containing text, a radio button, and a check box. Below is a picture of what I have currently and the code that generates it. However there…

ipetrik
- 1,749
- 18
- 28
0
votes
2 answers
Custom Java ListCellRenderer - Can't click JCheckBox
Made a custom ListCellRenderer:
import java.awt.Component;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
/**
*
* @author Spencer
*/
public class…

Spencer
- 4,018
- 10
- 33
- 43
0
votes
1 answer
Select from jlist and update jtable using checkbox
ive made a java program inside that i have 2 jlists(Main Category and Sub Category) and a jtable that retrieves values from mysql database , in the jtable there an extra column for checkbox , when the user selects a couple of rows and selects…

user3645728
- 45
- 1
- 9
0
votes
2 answers
How to link JcheckBoxes to JtextFields when they are being dynamically generated?
i want my app to create jcheckboxes from an input that always changes.
I want to create a jtextfield near every checkbox, that will be set enabled, only when his checkbox is pressed.
I managed to create this code:
//Create checkboxes with…

David Gidony
- 1,243
- 3
- 16
- 31
0
votes
1 answer
Checkbox in the beginning of jTable
I am new to Swing and seeking some help here. I need to show the data from an .xls file in a jTable. Below is my code which I followed from here :-
jbClick.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0)…

Partha Chetry
- 136
- 1
- 9