update
This commit is contained in:
28
DEV.2.1/CM1/ex3/Fenetre.java
Normal file
28
DEV.2.1/CM1/ex3/Fenetre.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/*Emmanuel SRIVASTAVA-TIAMZON*/
|
||||
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
|
||||
public class Fenetre extends JFrame {
|
||||
public Fenetre() {
|
||||
super("Compteurs");
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
this.setSize(500,500);
|
||||
this.setLocation(500,250);
|
||||
|
||||
Compteurs image6 = new Compteurs();
|
||||
this.add(image6);
|
||||
|
||||
JButton up = new JButton("up");
|
||||
up.setSize(50,50);
|
||||
up.setLocation(this.getWidth()/2, this.getHeight()/4);
|
||||
|
||||
JButton down = new JButton("down");
|
||||
down.setSize(50,50);
|
||||
down.setLocation(this.getWidth()/2, this.getHeight()*4);
|
||||
|
||||
this.add(up);
|
||||
this.add(down);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user