/**
* Create the graphical user interface. This is AWT code.
*/
private void initGUI() {
// all panels
Panel pQuery = new Panel();
Panel pCommand = new Panel();
Panel pButton = new Panel();
Panel pRecent = new Panel();
Panel pResult = new Panel();
Panel pBorderWest = new Panel();
Panel pBorderEast = new Panel();
Panel pBorderSouth = new Panel();
pQuery.setLayout(new BorderLayout());
pCommand.setLayout(new BorderLayout());
pButton.setLayout(new BorderLayout());
pRecent.setLayout(new BorderLayout());
pResult.setLayout(new BorderLayout());
pBorderWest.setBackground(SystemColor.control);
pBorderSouth.setBackground(SystemColor.control);
pBorderEast.setBackground(SystemColor.control);
// labels
Label lblCommand = new Label(" Command", Label.LEFT);
Label lblRecent = new Label(" Recent", Label.LEFT);
Label lblResult = new Label(" Result", Label.LEFT);
lblCommand.setBackground(SystemColor.control);
lblRecent.setBackground(SystemColor.control);
lblResult.setBackground(SystemColor.control);
// buttons
butExecute = new Button("Execute");
butScript = new Button("Script");
butImport = new Button("Import");
pButton.add("South", butScript);
pButton.add("Center", butExecute);
pButton.add("North", butImport);
// command - textarea
Font fFont = new Font("Dialog", Font.PLAIN, 12);
txtCommand = new TextArea(5, 40);
txtCommand.setFont(fFont);
// recent - choice
choRecent = new Choice();
// result - grid
gResult = new Grid();
// combine it
setLayout(new BorderLayout());
pRecent.add("Center", choRecent);
pRecent.add("North", lblRecent);
pCommand.add("North", lblCommand);
pCommand.add("East", pButton);
pCommand.add("Center", txtCommand);
pCommand.add("South", pRecent);
pResult.add("North", lblResult);
pResult.add("Center", gResult);
pQuery.add("North", pCommand);
pQuery.add("Center", pResult);
add("Center", pQuery);
add("West", pBorderWest);
add("East", pBorderEast);
add("South", pBorderSouth);
// [email protected] 20011210 - patch 450412 by [email protected]
doLayout();
}