JTable emulate a HTML Table?  
Author Message
x@a.c





PostPosted: 2004-4-6 12:17:00 Top

java-programmer, JTable emulate a HTML Table? Hi,

I want to display a table of user inputted information as a table but I am
having problems formatting the layout as I want it. I have a fixed cell
width and want the cell height to adjust to fit the text entered by the
user.
I can set the widths but can only set a fixed height for a cell and am
unable to get text to wrap within it,
for example. Also with the fixed height, the single line cells would float
to the vertical center of the cell, not stay at the top. Can alignments be
set?

[date textfield][item textfield][description textarea][idenifier
textfield][cost textfield]
[submit button]

Date Item Description
Identifier Cost
12/12/03 Big Pan This is a description field that BPI420
$60
15:30 spans multiple lines an needs
to wrap. The cell height
should dynamically alter to
accomodate the text.
1/1/04 Aspirin This is a much shorter
AS123 $20
description


Am I able to do this and if so how?
Is there a better way to do this than with using a JTable? I tried doing it
with a gridbag layout but the consecutive items wouldn't stay aligned.

Please help!

Cheers

Xav