public QuickInternalFrame() throws Exception {
Film[][] Watch = new Film[2][2];
Watch[0][0] = new Film("Shrek");
Watch[0][1] = new Film("Road to Perdition");
Watch[1][0] = new Film("The Truth about Cats and Dogs");
Watch[1][1] = new Film("Enigma");
/**
* Properties prop = new Properties(); prop.put("delimiter",",");
* prop.put("firstRowHasColumnNames","true");
**/
dBTable1 = new DBTable();
dBTable1.addTableCellListener(new ArrayCellListener());
dBTable1.refresh(Watch);
Column c = dBTable1.getColumn(0);
c.setReadOnly(false);
c.setHeaderValue("Film");
c.setPreferredWidth(139);
c.setResizable(true);
c = dBTable1.getColumn(1);
c.setHeaderValue("Film 2");
c.setPreferredWidth(139);
getContentPane().add(dBTable1);
dBTable1.createControlPanel();
dBTable1.enableExcelCopyPaste();
dBTable1.setSkin(new PulseSkin());
/**
* dBTable1.setDatabaseDriver("com.mysql.jdbc.Driver");
* dBTable1.createControlPanel();
* dBTable1.setSelectSql("select first_name from actor");
* dBTable1.setPassword("root");
* dBTable1.setJdbcUrl("jdbc:mysql://localhost:3306/Sakila");
* dBTable1.setUser("root");
*
* try { dBTable1.connectDatabase(); dBTable1.refresh(); }
* catch(SQLException e) { e.printStackTrace(); }
* catch(ClassNotFoundException e) { e.printStackTrace(); }
**/
setResizable(true);
setSize(550, 500);
setVisible(true);
}
}
public QuickTableInternalFrame() throws Exception {
JDesktopPane desktopPane = new JDesktopPane();
getContentPane().setLayout(new BorderLayout());
getContentPane().add(desktopPane, BorderLayout.CENTER);
desktopPane.add(new QuickInternalFrame());
setSize(700, 700);
setVisible(true);
}