DEV/BUT1/CONTROLE/DEV2.1/Entrainement/SUJETB/EXO4/SolutiondeGPT/SkyFrame.java

23 lines
519 B
Java
Raw Normal View History

2024-03-09 16:05:37 +01:00
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SkyFrame extends JFrame {
private SunPanel sunPanel;
public SkyFrame() {
setTitle("Sky with Sun");
setLayout(new BorderLayout());
sunPanel = new SunPanel();
add(sunPanel, BorderLayout.CENTER);
addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
sunPanel.increaseSunRadius(15);
}
});
}
}