PasswordDialogpublic class PasswordDialog extends Dialog
Fields Summary |
---|
Panel | panel1 | Panel | panel2 | Panel | dialogPanel | BevelPanel | bevelPanel1 | Button | button1 | Button | button2 | Label | label1 | TextField | textField1 | BorderLayout | borderLayout1 | BorderLayout | borderLayout2 | GridLayout | gridLayout1 | FlowLayout | flowLayout1 |
Constructors Summary |
---|
public PasswordDialog(Frame frame, String title, boolean modal)
super(frame, title, modal);
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
add(dialogPanel,BorderLayout.CENTER);
//pack();
| public PasswordDialog(Frame frame, String title)
this(frame, title, false);
| public PasswordDialog(Frame frame)
this(frame, "", false);
|
Methods Summary |
---|
void | button1_actionPerformed(java.awt.event.ActionEvent e)
dispose();
| void | button2_actionPerformed(java.awt.event.ActionEvent e)
dispose();
| private void | jbInit()
dialogPanel.setLayout(borderLayout2);
bevelPanel1.setLayout(borderLayout1);
button1.setLabel("OK");
button1.addActionListener(new PasswordDialog_button1_actionAdapter(this));
button2.setLabel("Cancel");
label1.setText("Enter Password");
textField1.setEchoChar('@");
gridLayout1.setVgap(4);
gridLayout1.setHgap(6);
button2.addActionListener(new PasswordDialog_button2_actionAdapter(this));
this.addWindowListener(new PasswordDialog_this_windowAdapter(this));
panel1.add(panel2);
bevelPanel1.setMargins(new Insets(4, 4, 4, 4));
panel2.setLayout(gridLayout1);
panel1.setLayout(flowLayout1);
dialogPanel.setSize(new Dimension(400, 100));
bevelPanel1.setBevelInner(BevelPanel.RAISED);
bevelPanel1.setBevelOuter(BevelPanel.LOWERED);
bevelPanel1.add(label1,BorderLayout.NORTH);
bevelPanel1.add(textField1,BorderLayout.SOUTH);
dialogPanel.add(panel1, BorderLayout.SOUTH);
panel2.add(button1);
panel2.add(button2);
dialogPanel.add(bevelPanel1,BorderLayout.CENTER);
pack();
textField1.requestFocus();
| void | this_windowClosing(java.awt.event.WindowEvent e)
dispose();
|
|