List of utility methods to do JTable Cell Renderer
void | setUpCellRenderer(JTable table) set Up Cell Renderer DefaultTableCellRenderer r = new DefaultTableCellRenderer() { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component renderer = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setBorder(BorderFactory.createEtchedBorder()); return renderer; }; int colCount = table.getColumnCount(); for (int i = 0; i < colCount; i++) { TableColumn col = table.getColumnModel().getColumn(i); col.setCellRenderer(r); |