The Java Tutorials' Weblog

pageicon Tuesday May 13, 2008

JTable: Freezing a column while scrolling the others

Have you ever needed to create a table that is too wide for the view so it requires a horitzonal scrollbar? OK, that's pretty routine. But have you then wanted one (or more) of the columns to remain fixed when you scroll the other columns?

Over on the javatutorials portal Collin Fagan has posted an example that shows how to do just that. Check out Row Labels/Frozen Columns. (You'll have to scroll down through several posts to see it.)

Thanks Collin!

-- Sharon Zakhour

Comments:

It would be nice to have frozen columns as part of the official JTable api.
This is a nice hack, but still a hack

Posted by Thierry Janaudy on May 17, 2008 at 05:21 AM PDT #

Well, I'm not saying that it's easy, but thanks to the fact that the JDK is now open (http://community.java.net/openjdk/), it's possible for anyone to contribute to the JDK. One would need to join the community, in this case the Swing project, and
participate.

Sharon

Posted by Sharon Zakhour on May 20, 2008 at 08:09 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
12
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

Feeds

Search this blog

Links

Weblog menu

Today's referrers

Today's Page Hits: 398