Bug 24340 - TableHeaders not painting properly
Summary: TableHeaders not painting properly
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 0.19
Assignee: Anthony Balkissoon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 20:39 UTC by Anthony Balkissoon
Modified: 2005-10-23 23:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-10-12 20:52:28


Attachments
patch (469 bytes, patch)
2005-10-13 19:34 UTC, Anthony Balkissoon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Balkissoon 2005-10-12 20:39:08 UTC
The testcase below shows that TableHeaders are not being painted properly.

***TESTCASE***
import java.awt.*;
import javax.swing.*;

class TableHeaderTest
{
  public static void main(String args[])
  {
    JFrame jf = new JFrame();
    JTable table;
    JScrollPane scrollPane;

    // Create columns names
    String columnNames[] = { "Column 1", "Column 2", "Column 3" };
    // Create some data
    String dataValues[][] =
      {
        { "12", "234", "67" },
        { "-123", "43", "853" },
        { "93", "89.2", "109" },
        { "279", "9033", "3092" }
      };
    
    // Create a new table instance
    table = new JTable( dataValues, columnNames );
    
    // Add the table to a scrolling pane
    scrollPane = new JScrollPane( table );
    jf.add( scrollPane, BorderLayout.CENTER );
    jf.setSize( 300, 200 );    
    jf.show();
  }
}
Comment 1 Anthony Balkissoon 2005-10-13 19:34:41 UTC
Created attachment 9983 [details]
patch
Comment 2 Anthony Balkissoon 2005-10-13 19:39:44 UTC
Fixed.