Commit d164ff02 authored by Hugo DACLON's avatar Hugo DACLON
Browse files

modif bouton pageJeu

parent 814b7098
......@@ -16,11 +16,15 @@ class ImagePanel extends JPanel {
super();
image = null;
}
public ImagePanel(String filePath){
this();
chargerImage(filePath);
}
public void chargerImage(String url) {
System.out.println("loading image from " + url);
public void chargerImage(String filePath) {
System.out.println("loading image from " + filePath);
try {
image = ImageIO.read(new File(url));
image = ImageIO.read(new File(filePath));
} catch (IOException e) {
e.printStackTrace();
}
......
package info1.Vue;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.*;
import javax.swing.*;
......@@ -16,14 +11,10 @@ public class ViewManager extends JFrame {
private Dimension ScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
private int screenWidth=(int) ScreenSize.getWidth();
private int screenHeight=(int) ScreenSize.getHeight();
private static final int WIDTH = 1000;
private static final int HEIGHT = 600;
public String getTitre() {
return this.getTitle();
}
public void setTitre(String titre) {
setTitle(titre);
public ViewManager() {
super();
}
public JPanel getMainView() {
......@@ -44,8 +35,12 @@ public class ViewManager extends JFrame {
this.pack();
this.setVisible(true);
}
public ViewManager() {
super();
public String getTitre() {
return this.getTitle();
}
public void setTitre(String titre) {
setTitle(titre);
}
}
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