apl/APL2.1/TP9_Evenements(suite)/Ex1.java
unknown d9949b5cb0 a
2022-01-14 06:54:18 +01:00

22 lines
528 B
Java

import javax.swing.*;
import java.awt.*;
public class Ex1
{
public static void main(String[] args)
{
JFrame fenetre = new JFrame();
fenetre.setSize(520, 90);
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Volume vol = new Volume();
VolumeListener volListener = new VolumeListener(vol);
fenetre.add(vol, BorderLayout.CENTER);
fenetre.addMouseWheelListener(volListener);
fenetre.setVisible(true);
}
}