Hi there,

take your renderer-reference (which is probably an extension of JCheckBox)
and set the alignment:

booleanRenderer.setHorizontalAlignment(SwingConstants.CENTER);
booleanRenderer.setVerticalAlignment(SwingConstants.CENTER);

Check out the API docs for more information (the methods are inherited from
AbstractButton)

Sincerely yours,
Pierre Jakobsen


> -----Oprindelig meddelelse-----
> Fra:  julia Ozerskiy [SMTP:[EMAIL PROTECTED]]
> Sendt:        7. maj 2001 16:55
> Til:  advanced swing
> Emne: {Advanced Swing]JCheckBox in JTable
> 
> Hi,
> 
> I have a JTable where one of the columns is rendered as a JCheckBox.
> I am having problems centering the check box inside the table's cell.
> Does anyone how I can center the check box inside a table both vertically
> and
> horizontally?
> 
> 
> _______________________________________________
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to