then the problem i am in is that i dont see the problem at all. here is the code i used to create the interface:
public Interface(){ setSize(1024, 768); setBackground(new Color(0,0,0)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); add(new MenuBar());//simple JMenuBar implementation table= new JTable(); table.setPreferredScrollableViewportSize(new Dimension(500, 500)); JScrollPane jsp = new JScrollPane(table); add(jsp); pack(); setVisible(true); }
after executing this code, I have code in another class that does this many times:
((DefaultTableModel)mainInterface.table.getModel()).addRow( new String[] {t.location,t.title,t.creator,t.album,t.genre,t.composer});
t is the track object, by the way.
source share