Results 1 to 4 of 4
  1. #1
    dinesh66 is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Thumbs up JTable To HTML Table

    plz help me how to convert my jtable vales to html tablesplz give some Examples

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by dinesh66 View Post
    plz help me how to convert my jtable vales to html tablesplz give some Examples
    You have to dig your way through the TableModel (see: JTable.getModel()) and construct your html table row by row given the structure of and the data in the TableModel.

    kind regards,

    Jos

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    Also escape any html formatting characters (or special characters, whatever they're called).

    Otherwise what would happen if the contents of one cell in the JTable just happened to be
    Java Code:
    </TD></TR></TBODY></TABLE>
    db

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,371
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Darryl.Burke View Post
    Also escape any html formatting characters (or special characters, whatever they're called).

    Otherwise what would happen if the contents of one cell in the JTable just happened to be
    Java Code:
    </TD></TR></TBODY></TABLE>
    db
    Ha, that reminds me of little Bobby Tables. ;-)

    kind regards,

    Jos

Similar Threads

  1. populate an HTML table(jstl)
    By Rajib27 in forum New To Java
    Replies: 0
    Last Post: 03-15-2010, 09:54 AM
  2. Resultset to HTML Table
    By IDForums in forum JDBC
    Replies: 7
    Last Post: 01-15-2010, 06:45 AM
  3. Export Html table to excel sheet by JS
    By roby_joshua in forum New To Java
    Replies: 1
    Last Post: 08-27-2008, 06:25 PM
  4. Problem with applying Sql order by to html table
    By sireesha264 in forum Advanced Java
    Replies: 2
    Last Post: 02-04-2008, 10:20 AM
  5. Showing ResultSet in HTML table
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-27-2008, 08:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •