Java - table - change table format
问题 how can I change table format in java? Now, I have left table, but I want my table looks like right table. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.TableCellRenderer; public class Farby extends JTable { public Farby(String[][] data, String[] fields) { super(data, fields); } @Override public Component prepareRenderer(TableCellRenderer renderer,