Java Reference
In-Depth Information
setVisible(true);
}
private void displayTableBuilderFrame(){
tableName = JOptionPane.showInputDialog(this,"Table:",
"Select table",JOptionPane.QUESTION_MESSAGE);
tableMaker = new TableBuilderFrame(tableName);
tableMaker.setCommandListener(new CommandListener());
desktop.add(tableMaker);
tableMaker.setSize(desktop.getSize());
tableMaker.setVisible(true);
}
private void displayTableEditFrame(){
tableName = JOptionPane.showInputDialog(this,"Table:",
"Select table",JOptionPane.QUESTION_MESSAGE);
tableEditor = new TableEditFrame(tableName,dbUtils);
desktop.add(tableEditor);
tableEditor.setSize(desktop.getSize());
tableEditor.setVisible(true);
}
private void displayTableQueryFrame(){
tableName = JOptionPane.showInputDialog(this,"Table:",
"Select table",JOptionPane.QUESTION_MESSAGE);
tableQuery = new TableQueryFrame(tableName,dbUtils);
desktop.add(tableQuery);
tableQuery.setSize(desktop.getSize());
tableQuery.setVisible(true);
}
// added for Chapter 10
private void displayInfoDialog(){
infoDlg = new InfoDialog(dbUtils);
Rectangle r = getBounds();
infoDlg.setBounds(r.x+r.width-250,r.y+10,240,360);
infoDlg.setVisible(true);
}
private void selectDatabase(){
// revised for Chapter 10
String[] databases = { "MSAccessContacts", "MySQLContacts",
"OracleContacts", "SQLServerContacts",
Search WWH ::




Custom Search