BUT2/DEV/DEV2.1/TP09_Evenement2/Q3_Rectangle/Barre.java

20 lines
440 B
Java
Raw Permalink Normal View History

2023-10-23 13:23:36 +02:00
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Barre{
public static void main(String[] args) {
Rectangle test = new Rectangle();
JFrame fenetre = new JFrame();
fenetre.setSize(800, 800);
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.add(test);
test.addMouseListener(test);
test.addMouseMotionListener(test);
fenetre.setVisible(true);
}
}