Click to See Complete Forum and Search --> : Help with Table - nested columns
khaleds
November 13th, 2003, 07:48 PM
hi everyone,
I'm doing a SE project and we have to rapid prototype, I'd like to have a kick *** one, but I'm having trouble with nest columns with the AbstractTableModel.
Here's our requirements, a picture of the nested columns under categories
http://waldorf.calpoly.edu/~ksaad/eGrader/requirements/grading-jdewey.html#After Graded Items are Added
Any ideas, need more clarrification?
Thx
cjard
November 14th, 2003, 05:38 AM
i think, perhaps, youre not seeing it how it is..
there isnt any nesting of columns in that eGrader.. it's just a split panel of 2 tables.. the upper table allows details to be entered for the students row by row, or perhaps shows cumulative totals, based on data entered elsewhere,
and the lower panel is another, separate table. the presence of scrollbars is the most confusing aspect here, but nothing impossible to deal with..
if you were to implemnt a program like this i would do it one step at a time, (obviously) BUT, start with the most complex table model. the table in figure 1 looks nice and simple, but later we see it has many more columns. i think it would be easier for you to start with the complicated one, in terms of table structure, but.. size all the unwanted (at this time) columns to 1, or 0, so they "disappear" from view
then, use focus change events to expand the missing columns as neccessary by giving them a new width. its all "easy" stuff, but theres a flippin lot of it! this is more than jsut a homework assignment, i think!
the only think im pondering over is the table header, and how to get rowspanning/colspanning ala html. dlorde or khp may have a better input on this, as ive never used a JTable with so complex a header - i'd be tempted to cheat, and use pictures:)
dlorde
November 14th, 2003, 08:04 AM
Khaleds - you might find these customized JTable examples useful: JTable Examples (http://www2.gol.com/users/tame/swing/examples/JTableExamples1.html).
Programs for sale: Fast, Reliable, Cheap: choose 2...
Anon.
cjard
November 14th, 2003, 12:35 PM
Originally posted by dlorde
Khaleds - you might find these customized JTable examples useful: JTable Examples (http://www2.gol.com/users/tame/swing/examples/JTableExamples1.html).
Programs for sale: Fast, Reliable, Cheap: choose 2...
Anon.
linkage++ ;)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.