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
0
votes
0 answers

JCheckBox in Table Model

I have this table model and I want to get Checkboxes in the first column. How can I do this? Do I have to make an extra column in my table? ResultSetMetaData metaData = rs.getMetaData(); int numberOfColumns = metaData.getColumnCount(); …
coo12
  • 117
  • 1
  • 11
0
votes
0 answers

how to work check box event for particular internal frame in swing

When I select/enable the check box for particular Intenalframe then perform related action.But,when create another new Internalframe the previous action is not applicable for this.I perform Any checkbox Action that is particular to that…
0
votes
1 answer

can you change all this thing (JCheckBox) go to array and loop?

I am doing some GUI and I use JCheckBox. I am wondering if this all can be do in an array and loop? It's so tiring to change every single thing. If you can help me I'd love to hear. if (box1.isSelected()) k = 40; if (box2.isSelected()) l =…
0
votes
1 answer

how to updateand detect the checked check boxes using default model table

I just wanna ask, how to detect a checked box on check boxes and how to update the table or delete the row of the checked box? i run this code and it exits the loop and didn't enter the if else statement :( for(int i =table.getRowCount(); i>= 0 ;…
Michimcchicken
  • 543
  • 1
  • 6
  • 21
0
votes
0 answers

How to Reset the check state and uncheck state of Menuitems for Multiple documents using swing

I want to Reset the state of checkboxMenuItems.For example I create More than one Document then add some text to recently opened document and select LineNumbers then I go to previos opened Document at that time the linenumbers checkbox is reset to…
0
votes
3 answers

How to Remember Checkbox Checked From Other Frame

I have two jframe, one is a main frame used to call check box frame, and another one is a jframe containing checkbox. MainFrame.java How to remember previous checked checkbox after main frame call again the checkbox frame? CheckBox.java below is…
Ridzuan Adris
  • 1,192
  • 2
  • 13
  • 32
0
votes
1 answer

How to change row background color in JTable dynamically after ticking checkbox in one column?

I'm trying to present some data in JTable. I've created Jtable everything is clear apart from changing background color of some particular rows - thouse in which user tick a checkbox on the last colum. It has to work dynamically. Could you give me…
user3607625
  • 113
  • 1
  • 2
  • 10
0
votes
2 answers

Get a JCheckBox working with an overriden Jtable getValueAt() function

I need a JTable to reflect a dynamic array's content so I had to override its getValueAt function. The problem is now JCheckboxes inside the table can't be toggled. I've been looking for an answer since I though this to be quite an usual situation…
Jesús Cruz
  • 192
  • 2
  • 18
0
votes
3 answers

How to allow 'one choice of many' controls?

I have a JFrame and in that frame I have some JCheckBox components. Say that I have two sets of 5 check boxes. I want to make it so that I check (for example) the first check box in the first set, the four others will be disabled. But not those in…
user3685412
  • 4,057
  • 3
  • 16
  • 16
0
votes
1 answer

Display fullname of JCheckBox item

I had design a JFrame with some components. In that JCheckBox component I had given a name but the full name is not displayed when I run the application. I want display the given name. Code public class FindDemo extends JFrame { Label l1; …
user3556256
  • 47
  • 3
  • 9
0
votes
1 answer

How to read Checkboxes status in Jlist

I am developing a GUI where I have included some Checkboxes into a Jlist but I cannot read their status. Below i have an example of my code final JScrollPane scrollPaneWat = new JScrollPane(); scrollPaneWat.setBounds(526, 248, 152, 140); …
user3358377
  • 145
  • 3
  • 16
0
votes
1 answer

How to put control in line with JTabbedPane?

I am wondering if it is possible to have a Java Swing control like a check box to the right of the tabs on a JTabbedPane so that space is not wasted by putting it above the tab control and also makes it look more professional. Any examples out there…
Tony Anecito
  • 347
  • 2
  • 13
0
votes
1 answer

Sorted JTable's return value of rowAtPoint(Point)

I am trying to make a Checkbox change value on click in a JTable. Here is the code I use for that in the MouseListener public void mouseClicked(MouseEvent e) { Point mouse = e.getPoint(); int row = table.rowAtPoint(mouse); int col =…
usama8800
  • 893
  • 3
  • 10
  • 20
0
votes
1 answer

Table doesn't work properly in JAVA

Hello I have created a Java program in that I want to display some data in table run time. Using below function the data displays perfectly, but I can't click on JTable data like check box or text. Thanks. My code is: public void…
user3559272
0
votes
1 answer

Display JCheckBox in JTable

I have a Jtable in which I want to add a JCheckbox in one column. However, when I create a JCheckbox object, javax.swing.JCheckBox is being displayed in the column.Please refer to the image. Can you tell me how to amend that please? I have searched…
user3419642
  • 27
  • 1
  • 6