Insubstantial / insubstantial

Swing look-and-feel library and assorted widgets
193 stars 57 forks source link

Remanent lines on tables with horizontal lines disabled #49

Open ebourg opened 12 years ago

ebourg commented 12 years ago

There is an issue with tables (JTable and JXTable) when the horizontal lines are disabled, the focus rollover leaves lines behind. It happens when the mouse is moved from the top to the bottom of the table. The line left is the last line of the row preceding the currently focused row:

UIManager.setLookAndFeel(SubstanceNebulaLookAndFeel.class.getName());

JTable table = new JTable();
table.setShowHorizontalLines(false);
table.setModel(new AbstractTableModel() {
    public int getRowCount() { return 20; }
    public int getColumnCount() { return 5; }
    public Object getValueAt(int rowIndex, int columnIndex) { return rowIndex + ":" + columnIndex; }
});

JFrame frame = new JFrame("Substance Table Test");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().add(table);
frame.setLocation(100, 100);
frame.setSize(400, 300);
frame.setVisible(true);