Some questions about JTable. (row-based design, displaying headers or not, )
Posted on 2003-02-27
I want to display a list of n pairs (x_value, y_value)
in a JTable with 2 rows (and n+1 columns) in a matter
x_value x1 x2 x3 ... xn
y_value y1 y2 y3 ... yn
Hence what I needed, would be a JTable with specifying
types for the rows rather than columns.
In addition the y-values should be editable while the
x-values are not.
1. Is it possible to specify row headers?
2. What is the standard method to suppress column headers?
3. Why are column headers shown, if adding a JTable to
some Layout wrapping it with a JScrollPane, while
headers are not shown, when not using JScrollPane.
Is it a Java bug?
Thank you very much!