Questions tagged [jcheckbox]

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.

613 questions
-1
votes
1 answer

JCheckbox in Java swing

I have created one checkbox this way: JCheckbox field = new JCheckBox("EDEX:", true);. I was add this to Jpanel and layout is FormLayout using CellConstraints xy positions. but it is not displayed EDEX text after checkbox. this is…
java2world
  • 219
  • 1
  • 2
  • 4
-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
1 answer

It is possible to disable drag and drop on the cells of a jtable column, specifically a checkbox column

I can only disable drag and drop for the entire table, but I need to be able to do it for the cells of a specific column, I don't know if it will be possible. Thank you for your answers.
FuryFox
  • 1
  • 1
-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
2 answers

JCheckBox[x] is null?

I made a new project with just the code, that contains the error: package benutzerschnittstelle; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; import…
-1
votes
1 answer

How to Retrieve Data using Checkbox in Eclipse using Java

Hello can someone guide me on how to write a coding if I want to retrieve data using checkbox. I did place the checkbox but I feel blank on how to do the next step. And Im using Eclipse with mySql. Please respond here thank you. this is the output…
-1
votes
1 answer

Set JPanel visible if checkbox is selected

I got two Classes: Panel A Panel B On Panel A, I got a checkbox, which (if selected) should set Panel B visible. This is what I got so far: public class PanelA extends JPanel { public static JCheckBox shopBox; public PanelA() { …
-1
votes
1 answer

How to get value from dynamic JCheckBox?

I created dynamic JCheckBox, and I don't know how to get their value when I check it. When I click the checkbox I want to get value and put them to SQL query. like : query = select checkbox1, checkbox2 from table This is my dynamic checkbox…
-1
votes
1 answer

How do I add a column of JCheckBox to a JTable via SQL?

I have created a JTable from data I stored in a SQL database. Basically, my number of columns are fixed in the JTable. Now I want to add a column which will allow the user to select a particular row using checkbox of that particular row. I searched…
-1
votes
1 answer

How can I add multiple checkboxes to jScrollPane?

I have a Java connection with MySQL database. I inserted 30 variable to a MySQL table. I would like to create a graphical interface with Jframe where I can select the variables from the table using a checkbox. I plan to do something similar as Java…
Beata
  • 335
  • 2
  • 10
  • 21
-1
votes
1 answer

is there a way to change jcheckbox to use a cross instead of a tick? JAVA

I have a Jcheckbox but it only has the tick to show its checked, is there a way i can change it to a cross, or circle? and is there a way to change the grey background to white the setBackground doesn't seem to make a difference?
f1wade
  • 2,877
  • 6
  • 27
  • 43
-1
votes
1 answer

Get the index of some JCheckBox's

I have researched already but yet haven't gotten further in this code. I am building a GUI pizza calculator that sums the size and crust (radio buttons) with how many toppings are selected (check boxes) and retrieve the final value. I created the…
-1
votes
2 answers

How am I able to show text from user input on column with JFrame?

I'm trying to create To Do List that allow user input to text to JCheckBox. But there is a problem which anything shows up on JFrame without last part of getContentPane().add(checkBox3,BorderLayout.EAST);. My ideal result is like…
Shuta
  • 21
  • 5
-1
votes
1 answer

more than two JCheckBox?

I want in my program 8 checkboxes, and each one of them if its clicked there will be statements It works nice with the first two checkboxes, but starting from the 3rd one i faced problem when I click the 3rd one for example it didn't show show the…
Najla
  • 1
-1
votes
1 answer

Dynamic Arraylist of checkboxes in Java Swing

I'm writing a GUI Java program for student registration which will retrieve available classes from database, give the user an option to choose classes and then store this in DB. What I'm trying to do and have so far achieved partial success, is this…