Scrolling certain columns in JTable
Posted on 2001-06-07
Im curious as to the feasibility of scrolling only certain columns of a JTable.
For instance say I have a JTable with 10 columns and I want the first 2 columns to stay in place (similar to headings) and the last column to stay in place as well. The remaining 7 I want to scroll since I only have room for 4. The JTable will almost always have a vertical scrollbar that will scroll the rows (vertically). But the horizontal scrollbar will keep some columns in place and scroll only certain columns while keeping others in place. (The scrolling ones will always be continous, obviously).
What would I need to do to accomplish this? Im pretty knowledgable about the JTable itself, however I have yet to customize it a whole lot to fit my needs with the exception of custom renderers and editors.
Im willing to give 2 - 300 point questions (600*4) for full working code that meets my needs (if someone has something like this tucked away and wants to make it available)
I havent been able to find any open source projects for this but Im willing to give the full 2 question points if someone can give me a link to one that can be used in a commercial project.
Otherwise just a general discussion on how someone may go about it will yield less points (150-300 points).