jdbc resultset and jtable


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: jdbc resultset and jtable

  1. #1
    David Branch Guest

    jdbc resultset and jtable


    i'm new to java from vb.

    How to a diplay an jdbc resultset in a swing jtable?

  2. #2
    Paul Clapham Guest

    Re: jdbc resultset and 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?




  3. #3
    David Branch Guest

    Re: jdbc resultset and 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?

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center