1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| package pendu;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Panel;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;
import javafx.scene.effect.Light.Point;
import javafx.scene.layout.Pane;
public class nouvellepartie extends JPanel {
JLabel lblImagegauche, jlbLabel3;
public nouvellepartie() {
super(new BorderLayout());
/*...*/
setBorder(new EmptyBorder(5, 5, 5, 5));
setBackground(new Color(120,120,120));
setLayout(new BorderLayout());
setPreferredSize( new Dimension( 500, 200 ) );
lblImagegauche = new JLabel();
ImageIcon img= new ImageIcon("/image/Pendu_1.png");
lblImagegauche.setIcon(img);
lblImagegauche.setVisible(true);
add(lblImagegauche, BorderLayout.NORTH);
}} |
Partager