- private void initialize() {
- frmLogin = new JFrame();
- frmLogin.setResizable(false);
- frmLogin.setTitle("Login ");
- frmLogin.setBounds(100, 100, 801, 521);
- frmLogin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frmLogin.getContentPane().setLayout(null);
- JButton button = new JButton("Confirm ");
- button.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- String t1 = textField_2.getText();
- String t9 = (String) comboBox.getSelectedItem();
- String t10 = passwordField.getText();
- if (t9.equals("Teacher")) {
- try {
- Class.forName("com.mysql.jdbc.Driver");
复制代码
我想把这个String t1调用到我另外的类里去,怎么做? |
|