在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

界面插件显示不出来

package Interface;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;


//import com.lhl.score.GUI.login.loginEvent;


public class login extends JFrame {
        private JPanel pane1;
        private JLabel usernameJL;
        private JLabel paswordJL;
        private JButton enter;
        private JButton cancel;
        JTextField usernameJT;
        JPasswordField passworkJT;
       
       
        public login(){
                getContentPane().setLayout(null);
                setTitle("运动会管理系统");
                pane1=new JPanel();
                enter=new JButton("登录");
                enter.addActionListener(null);


                cancel=new JButton("取消");
                cancel.addActionListener(null);


                usernameJL=new JLabel("用户名");
                usernameJT=new JTextField(20);
                paswordJL=new JLabel("密码");
                passworkJT=new JPasswordField("20");
                pane1.setLayout(null);
               
                enter.setBounds(50, 170, 25, 20);
                cancel.setBounds(50, 170, 25, 20);
                usernameJL.setBounds(20, 20, 30, 20);
                paswordJL.setBounds(20, 60, 30, 20);
                usernameJT.setBounds(60, 100, 70, 20);
                passworkJT.setBounds(60, 140, 70, 20);
                pane1.add(enter);
                pane1.add(cancel);
                pane1.add(usernameJL);
                pane1.add(paswordJL);
                pane1.add(usernameJT);
                pane1.add(passworkJT);
               
                setBounds(100, 100, 200, 160);
                getContentPane().add(pane1);
                validate();
                setVisible(true);
               
               
        }
        public static void main(String[] args){
        login login1=new login();
  }
}

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册