本题中,通过菜单“Connect”显示-个对话框,单击“0k”按钮后,所填写的内容就会传回到主窗口并显示出
10 查阅
本题中,通过菜单“Connect”显示-个对话框,单击“0k”按钮后,所填写的内容就会传回到主窗口并显示出来。password.setText(transfer.password); k=false; show( ); if(ok){ transfer.username=username.getText( ); transfer.password=new String(password.get Password( )); ) return ok; } private JTextField username; private JPasswordField password; private boolean ok; private JButton okButton; private J Button cancelButton; )
参考答案: