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

How to make list of JCheckBoxes and put it into JScrollPane

i am trying to make some list of JCheckBoxes and put it inside of a scrollpane. I tried to make array of checkboxes and put it in JList and then in JScrollPane but it only prints some info about checkboxes from methods. I want to achieve something…
Miljan Rakita
  • 1,433
  • 4
  • 23
  • 44
-1
votes
2 answers

Third option on JCheckBox?

When I use an application like Eclipse or Word, I occasionally see a JCheckBox that is neither selected nor deselected- it has a sort of 'minus' icon: What does this mean? Is there a purpose for it, and if so, how do I achieve it in Java?
RobotKarel314
  • 417
  • 3
  • 14
-1
votes
1 answer

how to write a code to set a boolean value either true or false in java swings

I want to set a boolean value to either true or false.I kept data base type as java.lang.boolean. and I want to write a code If the checkbox is selected It should be saved and I should be able to see in the frontend part. Can anyone suggest me with…
icesu
  • 47
  • 8
-1
votes
1 answer

JCheckBox checks for values in JTable column

I am a beginner at Java GUIs. I have a JTable with a few columns and one of those columns has values for some rows and for some other rows there are no values. I would like to make a JCheckBox listener see if there are values inside that column of…
user159941
  • 331
  • 5
  • 15
-1
votes
1 answer

Adding a listener to a JCheckBox completely clears JApplet

I have a JApplet program with multiple classes. RegPanel,WorkshopPanel, CnferenceGUI, CnferenceHandler and CnferenceClient. Basically RegPanel and WorkShop panel are added to the CnferenceGUI, which also creates and adds a couple small panels. The…
Stan Harris
  • 15
  • 1
  • 4
-1
votes
1 answer

Extending JCheckbox through multiple classes

I am trying to create a character creator using JCheckBox. I have created all my classes, however, when extending each class into the next, I am unable to see the return results for the prior class. For example, I have a Gender class and a Race…
-1
votes
1 answer

How to create jCheckbox in jTable when retrieve data from SQLite

I'm using netbeans and i connect it with SQLite database, below you will find the code which i use to fill the jtable from the database, the problem is that the status column ((third column)) shows me the boolean value as 1s and 0s how can i make it…
Sophia
  • 1
  • 4
-1
votes
1 answer

Checkbox Listener error

When I check if my Checkbox is selected or unselected, the function isSelected() doesn't work. I have this error: the method isSelected() is undefined for the type Checkbox, and I don't know why. Can you explain me where the problem is or tell me if…
user3476837
-1
votes
1 answer

How to cycle through all the checkboxes and nothing else in a Java container

I'd like to be able to do in Java what the pseudo code below suggests: for each jcheckbox in gui.panel1 jcheckbox.setEnabled(true); next I don't want to enable every component; just the checkboxes.
DSlomer64
  • 4,234
  • 4
  • 53
  • 88
-1
votes
2 answers

JCheckBox not showing (text appears, but without check box)

import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import…
Nicolas
  • 11
  • 2
  • 8
-1
votes
1 answer

How do I write an action to a check box in a table cell

In my java code, I have a table with 3 rows and 7 cells. These all rows has check boxes. Can I write an action for each check box. Is it possible? Thanks in Advance.
JhonF
  • 199
  • 2
  • 2
  • 7
-1
votes
1 answer

how to deselect a checkbox?

I want to deselect a checkbox when i click the Clear button. the below code doesn't work. jCheckBox1.setSelected(false); jCheckBox2.setSelected(false); jCheckBox3.setSelected(false); jCheckBox4.setSelected(false);
Jhi
  • 11
  • 1
  • 1
  • 2
-1
votes
3 answers

Formatting many checkboxes on Jframe or Jpanel

I have already a collection(List) of sentences. So I need to put every single sentences in a check box.The number of check boxes depends on the number of Vector Size. For example, I have 50 sentences, so I need 50 check boxes. Then user can check…
IsmailSab'i
  • 1
  • 1
  • 1
-1
votes
1 answer

JCheck box when placed in JTable cell not responding to mouse clicks

I am a newbie to Swings Can some on please help me I have a scenario: in which I placed JCheck boxes in the 3rd column of JTable by overriding its column class to return Boolean for the 3rd column. So it appears as though we have check boxes in…
smoothrace
  • 59
  • 3
-1
votes
1 answer

Getting checkbox values on clicking the button in swings

I need a small code in java for the following scenario: Button should get the selected checkboxes and executing the code for those checkboxes in my form.
Raj
  • 51
  • 1
  • 2
  • 4
1 2 3
40
41