Problem in tracing a very simple code
i'm new in java programming and
specially in IntellijIDEA
i have a simple code , a simple form which is having two buttons
public class frmLogin extends SuperClass implements ActionListener {
private JTextField txtUsername;
private JPasswordField txtPassword;
private JButton btnLogin;
private JButton btnSign;
JFrame frame;
public frmLogin() {
frame = new JFrame("Login");
frame.setContentPane(pnlMain);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
btnLogin.addActionListener(this);
btnSign.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnLogin) {
RSAHandler rsaHandler = new RSAHandler(); .....
i wanna trace my code but after showing form and clicking on a button , the trace will not continue
the program goes in running mode and its like that i'm not tracing , it runs all instructions without having a pause on breakpoints
i do trace using F7 key , but still i lose trace chain after clicking on a button
where is my mistake?
请先登录再写评论。
so you have plaeced a breakpoint in the actionPeformed method for the button you are going to press, and that breakpoint is never hit?
oh i got the answer
i should remove the breakpoints which where placed before that actionPerformed()
i don't know why , but by removing all those breakpoints , it stops at if (e.getSource() == btnLogin) {
:)