title: Remove border on JTable header
body: <p>I have a <code>JTable</code> attached to a <code>JScrollPane</code> by <code>JScrollPane.setRowHeaderView(JTable)</code>.
  Looking like this:</p>
  
  <p><img src="https://i.stack.imgur.com/KOUEX.png" alt="enter image description here"></p>
  
  <p>But I would like to remove the border(3d effect) around the line number table:</p>
  
  <p><img src="https://i.stack.imgur.com/3iF5H.png" alt="enter image description here"></p>
  
  <p>It is to thick. Any ideas how to remove it?</p>
  
  <pre><code>public class SimpleJTableHeader extends JFrame {
  
      public JTable table;
  
      public SimpleJTableHeader() {
  
          // CREATE A JTABLE
          Object rowData[][] = { { "a" }, { "b" }, { "c" }, { "d" } };
          Object columnNames[] = { "1" };
          table = new JTable(rowData, columnNames);
          table.setRowHeight(20);
          JScrollPane scrollPane = new JScrollPane(table);
  
          // ADD ROW NUMBERS TO THE TABLE
          scrollPane.setRowHeaderView(getHeaderTable());
  
          // SHOW TABLE
          JFrame frame = new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.add(scrollPane, BorderLayout.CENTER);
          frame.setSize(300, 150);
          frame.setVisible(true);
      }
  
      public JTable getHeaderTable() {
          final AbstractTableModel model = new AbstractTableModel() {
  
              private static final long serialVersionUID = 1L;
  
              @Override
              public int getColumnCount() {
                  return 1;
              }
  
              @Override
              public Object getValueAt(int row, int column) {
                  return table.convertRowIndexToModel(row);
              }
  
              @Override
              public int getRowCount() {
                  return table.getRowCount();
              }
          };
          JTable headerTable = new JTable(model);
          headerTable.setPreferredScrollableViewportSize(new Dimension(40, 0));
          headerTable.setRowHeight(20);
          headerTable.getColumnModel().getColumn(0).setCellRenderer(new TableCellRenderer() {
              @Override
              public Component getTableCellRendererComponent(JTable x, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                  Component component = table.getTableHeader().getDefaultRenderer().getTableCellRendererComponent(table, value, false, false, -1, -2);
                  component.setBackground(new Color(250, 250, 250));
                  return component;
              }
          });
          return headerTable;
      }
  
      public static void main(String args[]) {
          new SimpleJTableHeader();
      }
  }
  </code></pre>