i'm new to java from vb.
How to a diplay an jdbc resultset in a swing jtable?
Printable View
i'm new to java from vb.
How to a diplay an jdbc resultset in a swing jtable?
I'll assume you don't want updates to the JTable to propagate back to the
database (of course you can do that, but it's more complex).
Read the fields from each row of the result set and create a Vector from
them. You'll have one vector per row, add each of these vectors to a
containing vector (only one for the entire table). Then create a new
JTable(thatVector) and you can display the data.
Sun has a good tutorial on how to use JTables on their developer site. It's
worth reading.
PC2
David Branch <davidbr@optoneline.net> wrote in message
news:3a5fc665$1@news.devx.com...
>
> i'm new to java from vb.
>
> How to a diplay an jdbc resultset in a swing jtable?
thnaks
"Paul Clapham" <pclapham@core-mark.com> wrote:
>I'll assume you don't want updates to the JTable to propagate back to the
>database (of course you can do that, but it's more complex).
>
>Read the fields from each row of the result set and create a Vector from
>them. You'll have one vector per row, add each of these vectors to a
>containing vector (only one for the entire table). Then create a new
>JTable(thatVector) and you can display the data.
>
>Sun has a good tutorial on how to use JTables on their developer site.
It's
>worth reading.
>
>PC2
>
>David Branch <davidbr@optoneline.net> wrote in message
>news:3a5fc665$1@news.devx.com...
>>
>> i'm new to java from vb.
>>
>> How to a diplay an jdbc resultset in a swing jtable?
>
>