i would like to ask for some help regarding on this.
i have read a topic not long ago with the same matter but is about ImageIcon.
i tried to create my own but im getting not my desired output...
this code shows the boxes, but requires to double click on the checkbox before getting selected.
can somebody correct my code as single clicked? please?
thanks in advance.
Peter Taucher
Ranch Hand
Joined: Nov 18, 2006
Posts: 174
posted
0
I think there might be some code missing here ... because I don't see no tables. Nonetheless I think there might be a problem with the focus, so that the first mouse event on the table set's the focus (to the cell) and is consumed somehow. I think you might need to override the method 'isCellEditable' in your Editor...
Censorship is the younger of two shameful sisters, the older one bears the name inquisition. -- Johann Nepomuk Nestroy
Jhedzkie Skies
Ranch Hand
Joined: Oct 28, 2009
Posts: 118
posted
0
Peter Taucher wrote:I think there might be some code missing here ... because I don't see no tables.
these are just classes.
Jhedzkie Skies wrote:
this code shows the boxes, but requires to double click on the checkbox before getting selected.
can somebody correct my code as single clicked? please?
Peter Taucher wrote:
Nonetheless I think there might be a problem with the focus, so that the first mouse event on the table set's the focus (to the cell) and is consumed somehow. I think you might need to override the method 'isCellEditable' in your Editor...
ill try to do what you said. thanks for the tip. can you give me some snippets? im completely puzzled about this.
Rohit Kedia
Ranch Hand
Joined: Apr 24, 2010
Posts: 78
posted
0
You can use clickCountToStart(1) which is a method of DefaultCellEditor Class
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
//super.fireEditingStopped();
subject: putting multiple checkboxes on a JTable cell