Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用JavaGUI生成器和凭证处理类创建登录界面_Java - Fatal编程技术网

使用JavaGUI生成器和凭证处理类创建登录界面

使用JavaGUI生成器和凭证处理类创建登录界面,java,Java,因此,我正在尝试使用NetBeans GUI构建器构建一个简单的Java程序——一个登录界面应用程序 编辑器:NetBeans IDE 8.2 目标:接受名称和密码输入,将它们与存储和处理在不同类中的凭据相匹配(该类具有公共易失性字符串,该字符串将“true”和“false”作为值,因为我无法真正实现正确的布尔值,原因是——“实际参数与形式参数不匹配(”(我为布尔变量指定了一个方法)),并且每次成功登录都会打开一个特定网页,这是特定ID的特定网页。[[注意:Credentials.java中的密

因此,我正在尝试使用NetBeans GUI构建器构建一个简单的Java程序——一个登录界面应用程序

编辑器:NetBeans IDE 8.2

目标:接受名称和密码输入,将它们与存储和处理在不同类中的凭据相匹配(该类具有
公共易失性字符串
,该字符串将
“true”
“false”
作为值,因为我无法真正实现正确的布尔值,原因是——“实际参数与形式参数不匹配(”(我为布尔变量指定了一个方法)),并且每次成功登录都会打开一个特定网页,这是特定ID的特定网页。[[注意:Credentials.java中的密码存储为二进制,并使用脚本转换为ASCII,结果与用户输入的密码匹配]]

包含的类:Java_007.Java(主类,管理整个可视界面并将输入数据发送到Credentials.Java)和Credentials.Java(处理输入并将ID输入和密码输入与其中存储的配置文件相匹配)

代码:
Java_007.Java(我在代码中最左边的行中做了注释)




我从昨天开始一直在搜索互联网,但我真的找不到解决方案。我确信这与
Credentials.java
类中某些变量的volatile声明有关,也可能与
java_007.java
文件中的处理相关,但我不确定确切的专业是什么问题。任何帮助都将不胜感激!感谢您阅读本文。请随时索取我可能未提供的任何其他信息。

因此,事实证明,我在创建方法/实例之前就调用了它们……我尝试了一些我可以想到的方法,例如不使用直接getter,而是访问变量..NullPointerException已被解决,但存在一些代码规划问题。因此,现在我将重新考虑整个规划并转储此代码。祝您好运!

的可能重复项,但我尝试使用“encoded=new post(psv);”实例化变量,但它说在post()时找不到符号方法在同一个类中。我还尝试引用Credentials.java的变量,使用一个局部变量作为
Credentials c=new Credentials()
在Java_007.Java文件中问题是
凭证中的成员试图调用
Java_007.Java
中未初始化的变量。此外,您的类命名和类设计还有改进的空间,这根本不起作用。从
凭证
volatile String id=Java_007.n.getText(;
来自
Java_007
公共静态javax.swing.JTextField n;
->“n”未定义!因此对空变量调用
getText
会导致NPE。请重新考虑您的类设计。@Alexander哦,我明白了!我在那里做了一件坏事…我刚刚启动了Java,所以…还有很多改进的空间
import java.awt.Desktop;
import java.net.URL;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author walker_001
 */
public class Java_007 extends javax.swing.JFrame {

    /**
     * Creates new form Java_007
     */
    public Java_007() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

//ONLY ASSIGNMENT PART ALONG WITH THE STATUS OF THE OBJECTS(i.e. public, private..)

            back = new javax.swing.JPanel();
            decoration = new javax.swing.JPanel();
            close = new javax.swing.JButton();
            Title = new javax.swing.JLabel();
            name = new javax.swing.JLabel();
            password = new javax.swing.JLabel();
            n = new javax.swing.JTextField();
            ps = new javax.swing.JPasswordField();
            submit = new javax.swing.JButton();
            invalidinput2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAlwaysOnTop(true);
        setMinimumSize(new java.awt.Dimension(400, 250));
        setUndecorated(true);
        setResizable(false);

        back.setBackground(new java.awt.Color(255, 255, 255));
        back.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 204, 255)));
        back.setForeground(new java.awt.Color(255, 255, 255));
        back.setMaximumSize(new java.awt.Dimension(400, 250));
        back.setMinimumSize(new java.awt.Dimension(400, 250));
        back.setPreferredSize(new java.awt.Dimension(400, 250));

        decoration.setBackground(java.awt.Color.white);
        decoration.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(0, 204, 255)));
        decoration.setForeground(new java.awt.Color(255, 255, 255));
        decoration.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                decorationMouseDragged(evt);
            }
        });
        decoration.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                decorationMousePressed(evt);
            }
        });

        close.setBackground(new java.awt.Color(0, 0, 0));
        close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png"))); // NOI18N
        close.setBorder(null);
        close.setBorderPainted(false);
        close.setContentAreaFilled(false);
        close.setFocusPainted(false);
        close.setFocusable(false);
        close.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                closeFocusLost(evt);
            }
        });
        close.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                closeMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                closeMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                closeMouseReleased(evt);
            }
        });
        close.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeActionPerformed(evt);
            }
        });

        Title.setBackground(new java.awt.Color(255, 255, 255));
        Title.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        Title.setForeground(new java.awt.Color(0, 204, 255));
        Title.setText("Login");
        Title.setToolTipText("");

        javax.swing.GroupLayout decorationLayout = new javax.swing.GroupLayout(decoration);
        decoration.setLayout(decorationLayout);
        decorationLayout.setHorizontalGroup(
            decorationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, decorationLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(Title)
                .addGap(139, 139, 139)
                .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        decorationLayout.setVerticalGroup(
            decorationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(decorationLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(Title, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        name.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        name.setForeground(new java.awt.Color(0, 204, 255));
        name.setText("Name : ");

        password.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        password.setForeground(new java.awt.Color(0, 204, 255));
        password.setText("Password : ");

        n.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        n.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        n.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(0, 204, 255)));
        n.setCaretColor(new java.awt.Color(0, 204, 255));
        n.setMaximumSize(new java.awt.Dimension(192, 26));
        n.setMinimumSize(new java.awt.Dimension(192, 26));
        n.setPreferredSize(new java.awt.Dimension(192, 26));
        n.setSelectedTextColor(new java.awt.Color(255, 255, 255));
        n.setSelectionColor(new java.awt.Color(0, 204, 255));
        n.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                nFocusGained(evt);
            }
        });

        ps.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        ps.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        ps.setToolTipText("");
        ps.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(0, 204, 255)));
        ps.setCaretColor(new java.awt.Color(0, 204, 255));
        ps.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        ps.setEchoChar('\u2219');
        ps.setSelectedTextColor(new java.awt.Color(255, 255, 255));
        ps.setSelectionColor(new java.awt.Color(0, 204, 255));
        ps.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                psFocusGained(evt);
            }
        });

        submit.setBackground(new java.awt.Color(0, 0, 0));
        submit.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
        submit.setForeground(new java.awt.Color(0, 204, 255));
        submit.setText("Submit");
        submit.setToolTipText("");
        submit.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(0, 204, 255)));
        submit.setContentAreaFilled(false);
        submit.setFocusPainted(false);
        submit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                submitActionPerformed(evt);
            }
        });

        invalidinput2.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        invalidinput2.setForeground(new java.awt.Color(255, 0, 0));
        invalidinput2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        javax.swing.GroupLayout backLayout = new javax.swing.GroupLayout(back);
        back.setLayout(backLayout);
        backLayout.setHorizontalGroup(
            backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(decoration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backLayout.createSequentialGroup()
                .addGap(60, 60, 60)
                .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(backLayout.createSequentialGroup()
                            .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(name)
                                .addComponent(password))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(ps)
                                .addComponent(n, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addComponent(invalidinput2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(60, 60, 60))
        );
        backLayout.setVerticalGroup(
            backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backLayout.createSequentialGroup()
                .addComponent(decoration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(invalidinput2, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37)
                .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(name)
                    .addComponent(n, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addGroup(backLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(password)
                    .addComponent(ps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(back, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(back, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>                        

    private void closeActionPerformed(java.awt.event.ActionEvent evt) {                                      
        System.exit(0);
    }
    //user defined variables...start
    int xmouse;
    int ymouse; 
    Credentials c= new Credentials();
    //user defined variables...end

    private void closeMousePressed(java.awt.event.MouseEvent evt) {                                   
        close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close_pressed.png")));
    }                                  

    private void decorationMouseDragged(java.awt.event.MouseEvent evt) {                                        
        int x= evt.getXOnScreen();
        int y= evt.getYOnScreen();

        setLocation(x - xmouse, y - ymouse);
    }                                       

    private void decorationMousePressed(java.awt.event.MouseEvent evt) {                                        
        xmouse= evt.getX();
        ymouse= evt.getY();
    }                                       

    private void submitActionPerformed(java.awt.event.ActionEvent evt) {                                       
        String a= n.getText();
        String b= ps.getText();
        if (a.equals("") || b.equals("")){
            if (a.equals("") && b.equals("")){
                n.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 0, 0)));
                ps.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 0, 0)));
                invalidinput2.setText("Please enter your name and password.");
            }
            else if(a.equals("")){
                n.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 0, 0)));
                invalidinput2.setText("Please enter your name.");
            }
            else if(b.equals("")){
                ps.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(255, 0, 0)));
                invalidinput2.setText("Please enter your password.");
            }
        }
        else{
            if (a.equals(Credentials.a1) && c.encoded.equals("true")){
                try {
                    Desktop.getDesktop().browse(new URL("https://inbox.google.com/").toURI());
                } catch (Exception e) {}
                System.exit(0);
            }
            else if (a.equals(Credentials.a2) && c.encoded.equals("true")){
                try {
                    Desktop.getDesktop().browse(new URL("https://www.google.com/").toURI());
                } catch (Exception e) {}
                System.exit(0);
            }
            else if (a.equals(Credentials.a3) && c.encoded.equals("true")){
                try {
                    Desktop.getDesktop().browse(new URL("https://images.google.com/").toURI());
                } catch (Exception e) {}
                System.exit(0);
            }
            else{
                invalidinput2.setText("Invalid Credentials");
                //System.out.println(c.id);System.out.println(Credentials.pd);System.out.println(Credentials.passwrd);System.out.println(Credentials.psv);System.out.println(Credentials.encoded);
            }
            n.setText("");
            ps.setText("");
        }

    }                                      

    private void nFocusGained(java.awt.event.FocusEvent evt) {                              
        n.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(0, 255, 255)));
        ps.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(0, 255, 255)));
            invalidinput2.setText("");
    }                             

    private void psFocusGained(java.awt.event.FocusEvent evt) {                               
        n.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(0, 255, 255)));
        ps.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(0, 255, 255)));
            invalidinput2.setText("");
    }                              

    private void closeMouseExited(java.awt.event.MouseEvent evt) {                                  
        close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png")));
    }                                 

    private void closeMouseReleased(java.awt.event.MouseEvent evt) {                                    
        close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png")));
    }                                   

    private void closeFocusLost(java.awt.event.FocusEvent evt) {                                
        close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Close.png")));
    }                               


    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Java_007.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Java_007.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Java_007.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Java_007.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Java_007().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                     
    private javax.swing.JLabel Title;
    private javax.swing.JPanel back;
    private javax.swing.JButton close;
    private javax.swing.JPanel decoration;
    private javax.swing.JLabel invalidinput2;
    public static javax.swing.JTextField n;
    private javax.swing.JLabel name;
    private javax.swing.JLabel password;
    public static javax.swing.JPasswordField ps;
    public volatile javax.swing.JButton submit;
    // End of variables declaration                   
}
public class Credentials{
    public static String a1= "Strix";
    public static String a2= "PK";
    public static String a3= "Molt";

    static String b1= "0010001100110000011110000101011101001101001100010011000001011000";
    static String b2= "00110000001100000011000000110010001101100011100000110100";
    static String b3= "00110001001100100011001100110100";

    volatile String id= Java_007.n.getText();
    volatile String pd= Java_007.ps.getText();
    volatile String passwrd= passwrd(id);

    volatile String psv= psV(passwrd);

    public volatile String encoded= post(psv);

    public static void main(String[] args) {
        //System.out.println(id);System.out.println(pd);System.out.println(passwrd);System.out.println(psv);System.out.println(encoded);
    }

    private String passwrd(String password){
        if (id.equals(a1)){
            password= b1;
        }
        else if (id.equals(a2)){
            password= b2;
        }
        else if (id.equals(a3)){
            password= b3;
        }else{}
        return password;
    }

    private String psV(String e){
        StringBuilder b = new StringBuilder();
        int len = passwrd.length();
        int i = 0;
        while (i + 8 <= len) {
            char c = convert(passwrd.substring(i, i+8));
            i+=8;
            b.append(c);
            e= b.toString();
        }
        return e;

    }

    private static char convert(String bs) {
      return (char)Integer.parseInt(bs, 2);
    }

    private String post(String r){
        boolean go= false;
        if (id.equals(a1)){
            if (pd.equals(psv)){
                go= true;
            }
            else{
                go= false;
            }
        }
        else if (id.equals(a2)){
            if (pd.equals(psv)){
                go= true;
            }
            else{
                go= false;
            }
        }
        else if (id.equals(a3)){
            if (pd.equals(psv)){
                go= true;
            }
            else{
                go= false;
            }
        }
        else{
            go= false;
        }

        if (go == true){
            r= "true";
        }
        else{
            r= "false";
        }

        return r;
    }

}
run:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at Credentials.<init>(Credentials.java:10)
    at Java_007.<init>(Java_007.java:240)
    at Java_007$9.run(Java_007.java:361)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
BUILD SUCCESSFUL (total time: 1 second)