Commit 814b7098 authored by Hugo DACLON's avatar Hugo DACLON
Browse files

modif bouton pageJeu

parent 643fbe4f
package info1.Vue;
import info1.application.appli;
import info1.controlleur.QuitterJeuControleur;
import info1.controlleur.*;
import info1.network.*;
import javax.imageio.*;
import javax.swing.*;
import javax.swing.border.*;
import info1.ships.*;
import java.awt.event.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
public class PageJeu extends JPanel {
......@@ -37,7 +41,7 @@ public class PageJeu extends JPanel {
this.listPlouf = new ArrayList<>();
Dimension tailleMap = new Dimension(500,500);
Dimension tailleConfirmer = new Dimension(100,60);
Dimension tailleConfirmer = new Dimension(134,52);
Dimension taillePV = new Dimension (500,60);
JPanel panelMap = new JPanel();
......@@ -71,10 +75,17 @@ public class PageJeu extends JPanel {
JPanel sud = new JPanel();
sud.setLayout(new FlowLayout());
confirmer = new JButton("Shoot !");
confirmer = new JButton();
confirmer.setPreferredSize(tailleConfirmer);
confirmer.setAlignmentX(Component.CENTER_ALIGNMENT);
confirmer.setAlignmentY(Component.RIGHT_ALIGNMENT);
//!pour set les images c'est de là
try {
confirmer.setIcon(new ImageIcon((ImageIO.read(new File("img/interface/bouton/boutonShoot1.png"))).getScaledInstance((int)tailleConfirmer.getWidth(),(int)tailleConfirmer.getHeight(), Image.SCALE_SMOOTH)));
} catch (IOException e) {
System.out.println("problem loading image: "+"img/interface/bouton/boutonShoot1.png");
}
//!à là
sud.add(confirmer);
sud.setAlignmentX(Component.CENTER_ALIGNMENT);
sud.setAlignmentY(Component.RIGHT_ALIGNMENT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment