I have a JTable in which 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 as the radiobuttons are shown, and the correct ones are selected.
However the radiobuttons are too large to be completely visible, so I would like to reduce the height of the radiobuttons.
I tried changing the fontsize, as well as .setSize(), but that didn't have any effect on the height of the radiobutton.
After searching a lot, all I could find was the following :
btnVA.putClientProperty("JComponent.sizeVariant","mini");
btnUIT.putClientProperty("JComponent.sizeVariant","mini");
btnAAN.putClientProperty("JComponent.sizeVariant","mini");
where btnVA, btnUIT, and btnAAN are the radiobuttons in my RadioButtonRenderer.
If you want to see some more code let me know, and I will edit it in.
Is there anything special I should add to make the radiobuttons apply this ClientProperty?