java吧 关注:1,234,252贴子:12,701,047
  • 2回复贴,共1

java登陆窗口求教。。

只看楼主收藏回复

求大神,我实在不会。下面发


IP属地:广东1楼2013-09-03 16:04回复
    建立登陆窗口后:
    如何让窗口跳到登陆成功窗口
    还有那个后面的代码如何弄如密码,输入正确验证


    IP属地:广东2楼2013-09-03 16:07
    回复
      如何在这些代码里放入 密码验证??
      import java.awt.EventQueue; import javax.swing.JFrame;
      import javax.swing.JLabel;
      import javax.swing.JTextField;
      import javax.swing.JButton;
      public class sky { private JFrame frame;
      private JTextField textField;
      private JTextField textField_1; /**
      * Launch the application.
      */
      public static void main(String[] args) {
      EventQueue.invokeLater(new Runnable() {
      public void run() {
      try {
      sky window = new sky();
      window.frame.setVisible(true);
      } catch (Exception e) {
      e.printStackTrace();
      }
      }
      });
      } /**
      * Create the application.
      */
      public sky() {
      initialize();
      } /**
      * Initialize the contents of the frame.
      */
      private void initialize() {
      frame = new JFrame();
      frame.setTitle("\u767B\u9646\u754C\u9762");
      frame.setBounds(100, 100, 450, 300);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.getContentPane().setLayout(null);
      JLabel lblNewLabel = new JLabel("\u9152\u5E97\u7BA1\u7406\u9910\u996E\u7CFB\u7EDF");
      lblNewLabel.setBounds(147, 51, 113, 28);
      frame.getContentPane().add(lblNewLabel);
      textField = new JTextField();
      textField.setBounds(147, 118, 113, 21);
      frame.getContentPane().add(textField);
      textField.setColumns(10);
      textField_1 = new JTextField();
      textField_1.setBounds(147, 168, 97, 21);
      frame.getContentPane().add(textField_1);
      textField_1.setColumns(10);
      JLabel label = new JLabel("\u5DE5\u53F7");
      label.setBounds(71, 121, 54, 15);
      frame.getContentPane().add(label);
      JLabel label_1 = new JLabel("\u5BC6\u7801");
      label_1.setBounds(71, 171, 54, 15);
      frame.getContentPane().add(label_1);
      JButton button = new JButton("\u91CD\u7F6E");
      button.setBounds(87, 212, 93, 23);
      frame.getContentPane().add(button);
      JButton button_1 = new JButton("\u767B\u9646");
      button_1.setBounds(227, 212, 93, 23);
      frame.getContentPane().add(button_1);
      } }


      IP属地:广东3楼2013-09-03 16:08
      回复