Vieira Enzo
c9760eec09
Entregando el buen ron de Binks. Las olas bailan y yo cabalgo, Las olas en el viento.
25 lines
737 B
Java
25 lines
737 B
Java
import javax.swing.*;
|
|
import java.awt.*;
|
|
|
|
public class Playlist
|
|
{
|
|
public Playlist()
|
|
{
|
|
JFrame fenetre = new JFrame();
|
|
fenetre.setSize(250, 500);
|
|
fenetre.setLocation(100, 100);
|
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
GridLayout gestionnaire = new GridLayout(10, 1);
|
|
fenetre.setLayout(gestionnaire);
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
JLabel lab = new JLabel("Morceau n°" + (i+1));
|
|
PlaylistListener listener = new PlaylistListener(lab);
|
|
lab.addMouseListener(listener);
|
|
fenetre.add(lab);
|
|
}
|
|
fenetre.setVisible(true);
|
|
}
|
|
}
|