DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Hybrid View

  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?

    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links