Reputation: 79
How to change the JTable's font's colors when editing by double click. There is JTable's background color, JTable's foreground color and selection colors. How to change the colors of JTables cell editing text.
Thankyou.
Upvotes: 1
Views: 256
Reputation: 51525
Assuming you mean to change the color of the cell while editing that cell: configure the textField used by the cellEditor:
JTextField field = new JTextField();
field.setForeground(Color.RED);
table.setDefaultEditor(Object.class, new DefaultCellEditor(field));
Upvotes: 3