i am useing the following code to get only list of mysql tables and add them to the JComboBox. but what I get is only "[]" in the JComboBox! please help me with it
ArrayList<String> tables = new ArrayList<String>();
public ArrayList<String> tablesArray() throws SQLException
{
ResultSet result = connecting.getMetaData().getCatalogs();
while(result.next())
{
tables.add(result.getString(0));
}
return tables;
}
public JComboBox comboBox()
{
JComboBox<ArrayList> combo = new JComboBox<ArrayList>();
combo.addItem(tables);
combo.setBounds(130,30,190,30);
return combo;
}