aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTable column headers in 1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JTable column headers in 1.3" Watch "JTable column headers in 1.3" New topic
Author

JTable column headers in 1.3

glen kaatz
Greenhorn

Joined: Apr 29, 2001
Posts: 6
I'm sooo close. Please help. I want to make column headings for my table. The headings aren't showing up. If I say tc.setCellRenderer( new myRend() ); it uses my "header renderer" for each cell so I know that part works. When I say tc.setHeaderRendere( new myRend() ) it doesn't break but it doesn't do anything. I can see the constructor being called via a sysout but it is never getting to the getTableCellRendererComponent method - leads me to believe it doesn't think it has any cells to render...but - if I print to sysout the header value tc.getHeaderValue() it shows the string I want to display.
I have to be close. Any guesses?
Muchas gracias.
glen kaatz
Greenhorn

Joined: Apr 29, 2001
Posts: 6
...I found out that the headers display if I drop the table in a JScrollPane. How do I get them to display without a JScrollPane? Any ideas?
Thomas Suer
Ranch Hand

Joined: Sep 03, 2001
Posts: 50
Try this site out:
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
Tom
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JTable column headers in 1.3
 
Similar Threads
how to create jtable with rowheader as well as with columnheader
Hash Map Values Compare with String
Catching the Page break and giving headings at every new page
specify color for jtable column headings (each column heading color is different)
iReport freeze pane