How to jump from lines in if statement? For example, in the following code, I wanna the program jumps from line 10 and goes to command line 11 with being the true condition if.
1 btn[click].addActionListener(new ActionListener() {
2 @Override
3 public void actionPerformed(ActionEvent e) {
4 new_word.append(e.getActionCommand());
5 lb1.setText(lb1.getText() + e.getActionCommand());
6 if (new_word.toString().equals(words[number_words]))
7 // jump to line 11
8 }
9 });
10 Thread.sleep(delay_for_next_word);
11 JLabel label = new JLabel("");
Aucun commentaire:
Enregistrer un commentaire