Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JcheckBox in Jtable

Tags:

swing

I am having Check box in my Jtable.Check box displayed in center of column.My problem is when i click on check box it moves to left of that column and comes to center functionality wise works fine.Can any one tell How to stop the movement of checkbox

Thanks Ganesh

like image 321
Ganesh Avatar asked Aug 26 '26 23:08

Ganesh


1 Answers

Renderer and editor are handled separately. So when you click the cell, it will display the editor component instead of the renderer component displayed previously. Sounds like you have centered the JCheckBox used as renderer, but not the JCheckBox used as editor. Center the editor the same way you have centered the renderer.

This is the best answer I can give you without further details.

like image 75
Carlos Avatar answered Sep 02 '26 02:09

Carlos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!