> I now need to implment a Swing UI that is going to make extensive use of
> tables, and I anticipate the need for a easy to use sub-class" component
> that wraps or replaces JTable.
>
> Can anyone reccomend anything like the JClass library components that is
> either free or cheap?
JTable isn't all that difficult to subclass:
public class MyJTable extends JTable {
}
Seriously, though, if you create your own TableModel (there are only 9
methods in the interface, all of which are trivial to implement if your
data is stored internally as anything resembling a 2-d table) then
you'll be laughing. As far as getting the data goes.
If you're more concerned with the look of the table than with the data
that it shows, you can override JTable.getCellRenderer(row,col) and
return a custom renderer. TableCellRenderer only has 1 method, and it's
easy to implement!
Same goes for cell editors, column sizing, etc. If you take it one step
at a time, JTable is not the beast it appears to be when you're hit by
the big picture all at once. Same story for JTree, which seems to
confuse a lot of people.
The most important point I made: Take it slowly. Start with only a
custom TreeModel, make sure everything works for equal-sized,
non-editable, default rendering cells. Then add those features one at a
time and you'll be done before you know what happened!
-Jonathan