creation of the button stop (but doesn't do the action)

This commit is contained in:
Laure BEL 2024-05-27 13:12:08 +02:00
parent fc9bd5ed71
commit 4f29c74958
2 changed files with 13 additions and 2 deletions

View File

@ -259,7 +259,7 @@ public class Simulator extends Thread {
}
return saveState;
//TODO : complete method with proper return
}
/**
*
@ -302,7 +302,6 @@ public class Simulator extends Thread {
* to be alive in new state
*/
public void generateRandom(float chanceOfLife) {
//TODO : complete method
/*
* Advice :
* as you should probably have a separate class

View File

@ -64,6 +64,14 @@ public class MyInterface extends JFrame {
}
});
panelTop.add(btnGo);
JButton btnStop = new JButton("Stop");
btnStop.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
clicButtonStop();
}
});
panelTop.add(btnStop);
JButton btnClickAct = new JButton("Toggle Click");
btnClickAct.addActionListener(new ActionListener() {
@ -223,6 +231,10 @@ public class MyInterface extends JFrame {
mySimu.togglePause();
}
}
public void clicButtonStop() {
//TODO
}
public void clicButtonToggleClickAction() {
if(mySimu != null) {