首页 文章

请在第一行非法开始表达 . 需要使它工作 . 谢谢

提问于
浏览
-4

抱歉,这是我的整个文件 . 我只是新手问这里 .

我在这里遇到了问题 . 而且我在这里和那里搜索过,我仍然不能让它发挥作用 .

我希望这里有人可以帮助我 .

谢谢!错误:C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:非法启动表达式public static void main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:非法启动表达式public static void main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:';' expected public static main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:error:')'expected public static void main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:表达式的非法开始public static void main(String args []){C: \ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:';'预期的public static void main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:error:非法启动表达式public static void main(String args []){C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ src \ RegistrationSource \ Login.java:181:错误:';' expected public static main(String args []){8 errors C:\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ nbproject \ build-impl.xml:930:执行此行时发生以下错误:C :\ Users \ John Mavrick De Leon \ Documents \ NetBeansProjects \ Registration \ nbproject \ build-impl.xml:270:编译失败;请参阅编译器错误输出以获取详细信

这里启动代码:

package RegistrationSource;

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
    import java.awt.event.ActionEvent;
    import static javax.swing.JOptionPane.PLAIN_MESSAGE;


    public class Login extends javax.swing.JFrame {


    public Login() {
    initComponents();
        }


@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    tfusername = new javax.swing.JTextField();
    pfpassword = new javax.swing.JPasswordField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    blogin = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jSeparator1 = new javax.swing.JSeparator();
    jSeparator2 = new javax.swing.JSeparator();
    jSeparator3 = new javax.swing.JSeparator();
    jSeparator4 = new javax.swing.JSeparator();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setUndecorated(true);

    jPanel1.setBackground(java.awt.SystemColor.activeCaption);
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "Welcome", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Times New Roman", 1, 36))); // NOI18N

    jLabel1.setText("Username:");

    jLabel2.setText("Password:");

    blogin.setText("Login");
    blogin.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    blogin.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            bloginActionPerformed(evt);
        }
    });

    jButton1.setText("Cancel");

    jSeparator1.setForeground(new java.awt.Color(255, 255, 255));

    jSeparator2.setForeground(new java.awt.Color(255, 255, 255));

    jSeparator3.setForeground(new java.awt.Color(255, 255, 255));

    jSeparator4.setForeground(new java.awt.Color(255, 255, 255));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(58, 58, 58)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel1)
                                .addComponent(jLabel2))
                            .addGap(32, 32, 32)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(pfpassword)
                                .addComponent(tfusername, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(blogin, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(77, 77, 77)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGap(33, 33, 33)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE)
                        .addComponent(jSeparator2))))
            .addContainerGap(46, Short.MAX_VALUE))
        .addComponent(jSeparator3)
        .addComponent(jSeparator4)
    );
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addGap(17, 17, 17)
            .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(tfusername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel1))
            .addGap(38, 38, 38)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(pfpassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel2))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(blogin, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(29, 29, 29)
            .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE))
    );

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

    setSize(new java.awt.Dimension(400, 311));
    setLocationRelativeTo(null);
}// </editor-fold>                        

private void bloginActionPerformed(java.awt.event.ActionEvent evt) {                                       
    String sql = "select *from administrators where Username=? and Password=?";
    try{
        Class.forName("com.mysql.jdbc.Driver");
        Connection con = DriverManager.getConnection("jdbc:mysql://localhost/localdatabase","root","");
        PreparedStatement pst = con.prepareStatement(sql);

        pst.setString(1, tfusername.getText());
        pst.setString(2, new String (pfpassword.getPassword()));


        ResultSet rs = pst.executeQuery();
        if (rs.next()){
            JOptionPane.showMessageDialog(null, "Welcome " + tfusername.getText() + "!", "Successfull Log-in", JOptionPane.INFORMATION_MESSAGE);
               dispose();
            registrationform registration = new registrationform();
            registration.setVisible(true);


        }
        else {
            JOptionPane.showMessageDialog(null, "Invalid username or password! ", "Invalid", JOptionPane.ERROR_MESSAGE);
        }


    }catch (Exception e){
        JOptionPane.showMessageDialog(null, e);
}                                      

/**
 * @param args the command line arguments
 */

public static void main (String args []){

        loading splash = new loading();
        splash.setVisible(true);
        try{
            for (int i = 0 ; i<=100 ; i++)
            {
             Thread.sleep(40);
             splash.loadnum.setText(Integer.toString(i)+"%");
             splash.loadbar.setValue(i);
             if (i == 100){     
                 splash.setVisible(false);
                 JOptionPane.showMessageDialog(null, "STUDENT RECORD SYSTEM", "S.Y. 2018 - 2019", PLAIN_MESSAGE);
             }
            }              
        }catch (Exception e){
            JOptionPane.showMessageDialog(null, e);
        }

    java.awt.EventQueue.invokeLater(new Runnable() {


        public void run() {
            new Login().setVisible(true);
        }
    });

}

// Variables declaration - do not modify                     
private javax.swing.JButton blogin;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JSeparator jSeparator3;
private javax.swing.JSeparator jSeparator4;
private javax.swing.JPasswordField pfpassword;
private javax.swing.JTextField tfusername;
// End of variables declaration

}

1 回答

  • 0

    好的 . 我会尽力帮助你,不仅仅是你的问题,还有你编码风格的东西 .

    我会发布你的代码并评论我的解释 .

    package RegistrationSource;
    
    /*
     * You import stuff to simplify your Code and your typing work.
     * Example:
     * If you don't import javax.swing.*, then you must write it before every Class you want to use in this package.
     * But if you import javax.swing.*, then you don't need to write it anymore.
     * With that said, you can delete every "javax.swing." you see in your code, except for:
     * import javax.swing.*;
     * 
     * Also, your static JOptionPane imports are not necessarily.
     * You can just write: JOptionPanel.PLAIN_MESSAGE, because you only use it twice.
     * 
     * Keep in mind:
     * If you import javax.swing.*; it means you actually import every class in this package.
     * This is not as performing as importing every Class by itself, but I'll leave this to you.
     * Since you're using quite a lot of javax.swing it's fine this time.
     */
    
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import javax.swing.border.*; // You need this, because border is also a package and not a class. You'll see down below
    
    import java.awt.Color; // added import
    import java.awt.Cursor; // added import
    import java.awt.Dimension; // added import
    import java.awt.EventQueue; // added import
    import java.awt.Font; // added import
    import java.awt.SystemColor; // added import
    import java.awt.event.ActionEvent; // added import
    import java.awt.event.ActionListener;
    
    public class Login extends JFrame {
    
        /*
         * Global Variables are declared just underneath the class declaration. So
         * whenever another programmer reads your code, they always see what they're using or what you were using.
         */
    
        private JButton blogin;
        private JButton jButton1;
        private JLabel jLabel1;
        private JLabel jLabel2;
        private JPanel jPanel1;
        private JSeparator jSeparator1;
        private JSeparator jSeparator2;
        private JSeparator jSeparator3;
        private JSeparator jSeparator4;
        private JPasswordField pfpassword;
        private JTextField tfusername;
    
        public Login() {
            initComponents();
        }
    
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
    
            jPanel1 = new JPanel();
            tfusername = new JTextField();
            pfpassword = new JPasswordField();
            jLabel1 = new JLabel();
            jLabel2 = new JLabel();
            blogin = new JButton();
            jButton1 = new JButton();
            jSeparator1 = new JSeparator();
            jSeparator2 = new JSeparator();
            jSeparator3 = new JSeparator();
            jSeparator4 = new JSeparator();
    
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setUndecorated(true);
    
            jPanel1.setBackground(SystemColor.activeCaption);
            jPanel1.setBorder(
                    BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)), "Welcome",
                            TitledBorder.LEFT, TitledBorder.DEFAULT_POSITION, new Font("Times New Roman", 1, 36))); // NOI18N
    
            /*
             * I'm talking about jpanel1.setBorder: Since I've imported the package
             * javax.swing.border.*; You can now just write TitledBorder.Something. If I
             * wouldn't import javax.swing.border.*, you must've written:
             * javax.swing.border.TitledBorder… But this isn't as readable as just
             * TitledBorder.
             */
    
            jLabel1.setText("Username:");
    
            jLabel2.setText("Password:");
    
            blogin.setText("Login");
            blogin.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
            blogin.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    bloginActionPerformed(evt);
                }
            });
    
            jButton1.setText("Cancel");
    
            jSeparator1.setForeground(new Color(255, 255, 255));
    
            jSeparator2.setForeground(new Color(255, 255, 255));
    
            jSeparator3.setForeground(new Color(255, 255, 255));
    
            jSeparator4.setForeground(new Color(255, 255, 255));
    
            GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(58, 58, 58).addGroup(jPanel1Layout
                                    .createParallelGroup(GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel1).addComponent(jLabel2))
                                            .addGap(32, 32, 32)
                                            .addGroup(jPanel1Layout
                                                    .createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                                    .addComponent(pfpassword).addComponent(tfusername,
                                                            GroupLayout.PREFERRED_SIZE, 185, GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(blogin, GroupLayout.PREFERRED_SIZE, 96,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGap(77, 77, 77).addComponent(jButton1, GroupLayout.PREFERRED_SIZE, 96,
                                                    GroupLayout.PREFERRED_SIZE))))
                            .addGroup(
                                    jPanel1Layout.createSequentialGroup().addGap(33, 33, 33).addGroup(
                                            jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                                    .addComponent(jSeparator1, GroupLayout.DEFAULT_SIZE, 311,
                                                            Short.MAX_VALUE)
                                                    .addComponent(jSeparator2))))
                            .addContainerGap(46, Short.MAX_VALUE))
                    .addComponent(jSeparator3).addComponent(jSeparator4));
            jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(17, 17, 17)
                            .addComponent(jSeparator1, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(tfusername, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel1))
                            .addGap(38, 38, 38)
                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                                    .addComponent(pfpassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel2))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jSeparator2, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                    .addComponent(blogin, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jButton1, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE))
                            .addGap(29, 29, 29)
                            .addComponent(jSeparator3, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jSeparator4, GroupLayout.PREFERRED_SIZE, 5, GroupLayout.PREFERRED_SIZE)));
    
            GroupLayout layout = new GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jPanel1,
                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
            layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jPanel1,
                    GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    
            setSize(new Dimension(400, 311));
            setLocationRelativeTo(null);
        }// </editor-fold>
    
        /*
         * Now here comes the real problem: You forgot to close the curly bracket for your method "bloginActionPerformed.
         */
    
        private void bloginActionPerformed(ActionEvent evt) {
            String sql = "select *from administrators where Username=? and Password=?";
            try {
                Class.forName("com.mysql.jdbc.Driver");
                Connection con = DriverManager.getConnection("jdbc:mysql://localhost/localdatabase", "root", "");
                PreparedStatement pst = con.prepareStatement(sql);
    
                pst.setString(1, tfusername.getText());
                pst.setString(2, new String(pfpassword.getPassword()));
    
                ResultSet rs = pst.executeQuery();
                if (rs.next()) {
                    JOptionPane.showMessageDialog(null, "Welcome " + tfusername.getText() + "!", "Successfull Log-in",
                            JOptionPane.INFORMATION_MESSAGE);
                    dispose();
                    registrationform registration = new registrationform();
                    registration.setVisible(true);
    
                } else {
                    JOptionPane.showMessageDialog(null, "Invalid username or password! ", "Invalid",
                            JOptionPane.ERROR_MESSAGE);
                }
    
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
    
            /**
             * @param args
             *            the command line arguments
             */
        } //bloginActionPerformed
    
        public static void main(String args[]) {
    
            loading splash = new loading();
            splash.setVisible(true);
            try {
                for (int i = 0; i <= 100; i++) {
                    Thread.sleep(40);
                    splash.loadnum.setText(Integer.toString(i) + "%");
                    splash.loadbar.setValue(i);
                    if (i == 100) {
                        splash.setVisible(false);
                        JOptionPane.showMessageDialog(null, "STUDENT RECORD SYSTEM", "S.Y. 2018 - 2019",
                                JOptionPane.PLAIN_MESSAGE);
                    }
                }
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
    
            /*
             * I've explained this already.
             * Lambdas are more readable and shorter.
             * They're very helpful, read about them. I recommend it.
             */
    
    //      EventQueue.invokeLater(new Runnable() {
    //
    //          public void run() {
    //              new Login().setVisible(true);
    //          }
    //      });
    
            EventQueue.invokeLater(() -> new Login().setVisible(true));
    
    
        } //main
    
    } // Class
    

    如果您只是复制此代码,它应该工作 . 不过,我建议阅读我的评论 .

    我将总结你的错误和我的风格建议:

    • 变量在类声明下声明

    • 你不明白导入东西的目的 . 我建议你玩简单的东西来理解它 .

    • 你可以使用一个lambda,这是更好的 .

    • 你的 class 名称没有改正,因为这会弄乱你的代码 . 你应该自己纠正它 .

    Now your main mistake: You simply forgot to close a curly bracket.

    如果您不关心我的其他建议和改进,您可以忽略我写的所有内容并关闭方法“bloginActionPerformed”的大括号 . 这应该工作 .

    玩得开心 .

相关问题