Re: Retrieving information from MySQL Database



christopher_board@xxxxxxxxxxx wrote:
Hi. I am trying to retrieve information from a MySQL database and
placing it in a JTable. However the code I have used gets the results
and displays it in the system output. However no results are placed in
the JTable. Does anyone know the reason.

Yes, I do. You are not passing any data to your JTable constructor.

<code snipped>

You are also constructing the JTable inside a loop, this seems a bad idea.

Since your "cells" variable isn't suitable for passing to JTable() directly, I'd use a TableModel to feed your "cells" data to a JTable. I haven't looked closely at your code so I'm assuming your "cells" variable eventually holds the entire set of data for the table.
.



Relevant Pages

  • Questions About ComboBox
    ... I have added a combobox to an Excel sheet. ... programmatically by placing them in cells in the worksheet. ... Is there another way to specify the list values other than placing them ...
    (microsoft.public.excel.programming)
  • front page and photo shop 6
    ... Have you tried structuring your site with the use of ... tables and placing the content (including the text you ... refer to in your question) in the cells of those tables? ...
    (microsoft.public.frontpage.client)
  • RE: line spacing between images????
    ... "Jason" wrote: ... > I'm placing 4 images each below the other, ... > there oblong with text on each and intended as links ... > I'v a table with three cells across - centre has an image, ...
    (microsoft.public.frontpage.client)
  • Re: This has kept me up typing for hours...
    ... You need to make that reference static by placing a $ in front of them. ... when you copy them to other cells the reference will not change ... mphell0's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30153 ...
    (microsoft.public.excel.misc)