I have a big button when clicked , adds an image to a table
class BigButtonListener implements ActionListener{
Image screenshot=null;
Browser bigbrowser =null;
BigButtonListener(Browser browser, DefaultTableModel dataModel, DefaultTableModel historyModel, JTable dataTable, JTable historyTable) {
screenshot = browser.toImage(true);
bigbrowser = browser;
historyTable = historyTable;
//table1.addRow
}
@Override
public void actionPerformed(ActionEvent e) {
// save current image
historyModel.insertRow(0,new Object[]{new ImageIcon(screenshot)});
//System.out.println(historyTable.getRowCount());
}
}
however, all this adds is the text javax.swing.ImageIcon@9dfb04
and not the actual picture.