private void getTable()
{
Statement statement;
ResultSet resultSet;
try
{
query = "SELECT * FROM accounts";
statement = conn.createStatement();
resultSet = statement.executeQuery( query );
displayResultSet( resultSet );
statement.close();
}
catch ( SQLException sqlex )
{
System.err.println( "Unable to connect" );
sqlex.printStackTrace();
}
}

private void displayResultSet( ResultSet rs )throws SQLException
{
boolean moreRecords = rs.next();
if ( ! moreRecords ) {
JOptionPane.showMessageDialog( this, "ResultSet contained no records" );
setTitle( "No records to display" );
return;
}

Vector columnHeads = new Vector();
Vector rows = new Vector();

try {
ResultSetMetaData rsmd = rs.getMetaData();
for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
{
columnHeads.addElement( rsmd.getColumnName( i ) );
}
do {
rows.addElement( getNextRow( rs, rsmd ) );
} while ( rs.next() );

table = new JTable( rows, columnHeads );
table.getTableHeader().setReorderingAllowed(false) ;
JScrollPane scroller = new JScrollPane( table );
table.setFillsViewportHeight(true);
scroller.setBounds(4,20,975,170);
table.setEnabled(false);
zero.add(scroller);
}
catch ( SQLException sqlex )
{
System.err.println( "Unable to connect" );
sqlex.printStackTrace();
}
}

private Vector getNextRow( ResultSet rs, ResultSetMetaData rsmd )throws SQLException
{
Vector currentRow = new Vector();

for ( int i = 1; i <= rsmd.getColumnCount(); ++i )
switch( rsmd.getColumnType( i ) ) {
case Types.VARCHAR:
currentRow.addElement( rs.getString( i ) );
break;
case Types.INTEGER:
currentRow.addElement(new Long( rs.getLong( i ) ) );
break;
case Types.FLOAT:
currentRow.addElement(new Float( rs.getFloat( i ) ) );
break;
default:
System.out.println( "Type was: " + rsmd.getColumnTypeName( i ) );
}
return currentRow;
}

probs is, it doesnt get float....