How can I change the font when editing a cell in JTable?

Scott Stanchfield

To change the font, you need to provide a CellEditor for the table with the font you want.

To create a cell editor that uses a text field with a custom font.

JTextField field = new JTextField();
CellEditor editor = new DefaultCellEditor(field);

Then set that as the editor for the column you want.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact