我可以禁用jlabel鼠标事件吗?

g2ieeal7  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(116)

我想禁用报表解锁。有人能解释一下吗?

private void report_unlockMouseClicked(java.awt.event.MouseEvent evt) {                                           

        String password=JOptionPane.showInputDialog("Enter the security key:");

        if(password.contains("xxxxxxx")){
            reports.setEnabled(true);
            JOptionPane.showMessageDialog(null, "Login success ", "Report Unlock",JOptionPane.PLAIN_MESSAGE);
            report_unlock.setEnabled(false);
        }
        else{
            reports.setEnabled(false);
            JOptionPane.showMessageDialog(null, "Login unsuccess ", "Report Unlock",JOptionPane.PLAIN_MESSAGE);
        }

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题