Search:

Type: Posts; User: Mr.777

Search: Search took 0.10 seconds.

  1. Thread: JTable

    by Mr.777
    Replies
    10
    Views
    1,390

    Re: JTable

    So i would recommend to see this: Database Programming with JDBC and Java: Chapter 4. Database Access Through JDBC
  2. Thread: JTable

    by Mr.777
    Replies
    10
    Views
    1,390

    Re: JTable

    Okay so take it step by step.
    1. You get resultset.
    2. Iterate through the result Set
    3. Against each iteration, set the value of table column headers.

    Isn't it simple?
  3. Thread: JTable

    by Mr.777
    Replies
    10
    Views
    1,390

    Re: JTable

    Okay so you mean that in database data is like


    name
    1
    2
    3

    and you want to display it in your application like
  4. Thread: JTable

    by Mr.777
    Replies
    10
    Views
    1,390

    Re: JTable

    Well, if you want to set the columnHeaders, use the DefaultTableModel and then using it set the values for table headers. Moreover, What are you talkinga bout printing like box layout and what?...
  5. Thread: JTable

    by Mr.777
    Replies
    10
    Views
    1,390

    Re: JTable

    What is the error? Kindly copy the exception trace and paste here. Well, for your information, rs.getString() never works as you did here;


    for (int j1 = 0; j1 < 6; j1++) {
    ...
Results 1 to 5 of 5