Tuesday, 15 May 2012

java - How to change the height of a radiobutton -



java - How to change the height of a radiobutton -

i have jtable in 1 column contains 3 radiobuttons per cell

mgrddata.getcolumnmodel().getcolumn(intcol).setcellrenderer(new radiobuttonrenderer()); radiobuttoneditor butedit = new radiobuttoneditor(new jcheckbox()); mgrddata.getcolumnmodel().getcolumn(intcol).setcelleditor(butedit);

this works fine radiobuttons shown, , right ones selected.

however radiobuttons big visible, cut down height of radiobuttons.

i tried changing fontsize, .setsize(), didn't have effect on height of radiobutton.

after searching lot, find next :

btnva.putclientproperty("jcomponent.sizevariant","mini"); btnuit.putclientproperty("jcomponent.sizevariant","mini"); btnaan.putclientproperty("jcomponent.sizevariant","mini");

where btnva, btnuit, , btnaan radiobuttons in radiobuttonrenderer.

if want see more code allow me know, , edit in.

is there special should add together create radiobuttons apply clientproperty?

try setpreferredsize() // pretty sure syntax.

method instead, see if helps any. remember in class having issue.

java swing jradiobutton

No comments:

Post a Comment