Let's say you were designed a JTable and it came out too wide. You
would prefer not to scroll. What are your options?
1. some way of doing data entry in a narrow multiline cell?
2. alternating what is in odd-even rows?
3. variable width columns, something to widen temporarily a given cell
with just a keystroke?
4. something else?

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
> Let's say you were designed a JTable and it came out too wide. You
> would prefer not to scroll. What are your options?
[quoted text clipped - 7 lines]
>
> 4. something else?
There are two main reasons why your table might be too wide.
(1) The values are really long (e.g. arbitrarily long text strings)
(2) The number of columns is very high.
For (1), you can usually just visually truncate the text after a certain
maximum length, perhaps appending "..." at the end to give the user a visual
clue that some data is missing. Of course, as soon as the user wishes to
edit the data, you display the full text in some scrollable text box.
For (2) the generic trick is to get rid of some columns. Usually the
columns can be sorted into two categories "identifiers" and "details".
"identifiers" are the columns that are likely to be indices in a relation
DB, that the user will probably want to sort upon, and scan through to find
a specific item. A table of people, for example might have their last names,
user id, social security number or internal id number as their identifiers.
You want to keep the identifier columns.
The detail columns are the information the user wishes to read, ONLY for
the rows she is interested in. That is usually the user doesn't want to see
the details of ALL the rows. Contrast this with the identifiers, where the
user usually DOES want to see the identifiers of all the rows, to quickly
identify the row she is interested in.
In Java, you can use a splitframe so that the table with the identifier
columns are displayed on one side, and the detail information (not
nescessarily in the form of a JTable) of the current selected row is
displayed on the other side of the splitframe.
- Oliver