Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
78214bde2a |
385
src/main/java/vue/GameInterface.form
Normal file
385
src/main/java/vue/GameInterface.form
Normal file
@ -0,0 +1,385 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||||
|
<Properties>
|
||||||
|
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[1056, 727]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<SyntheticProperties>
|
||||||
|
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||||
|
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||||
|
</SyntheticProperties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||||
|
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||||
|
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||||
|
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||||
|
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-80,0,0,4,12"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||||
|
<Property name="useNullLayout" type="boolean" value="false"/>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPMap">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="10" y="10" width="-1" height="-1"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="jLMap" alignment="1" pref="100" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="jLMap" alignment="0" pref="100" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLMap">
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLMapMouseClicked"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPJoueurs">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="790" y="10" width="220" height="420"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
|
||||||
|
<Property name="columns" type="int" value="1"/>
|
||||||
|
<Property name="rows" type="int" value="5"/>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||||
|
<Properties>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="33" green="0" red="ff" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="138" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="jLabel9" min="-2" pref="43" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel9" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Icon"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel9">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Score:"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||||
|
<Properties>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="ff" green="99" red="66" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="136" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel11">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Icon"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel12">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||||
|
<Properties>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="cc" green="66" red="ff" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="136" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel17" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel17" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel16">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Icon"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel17">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||||
|
<Properties>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="33" green="ff" red="33" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel21" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="136" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel22" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel21" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel22" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel21">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Icon"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel22">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||||
|
<Properties>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="33" green="ff" red="ff" type="rgb"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel26" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace pref="136" max="32767" attributes="0"/>
|
||||||
|
<Component id="jLabel27" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel26" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel27" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel26">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Icon"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel27">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Pseudo: Choisissez une taille pour la route"/>
|
||||||
|
</Properties>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="10" y="128" width="-1" height="-1"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||||
|
</AuxValues>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="6" y="173" width="-1" height="179"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JTextArea" name="jTextArea2">
|
||||||
|
<Properties>
|
||||||
|
<Property name="editable" type="boolean" value="false"/>
|
||||||
|
<Property name="columns" type="int" value="20"/>
|
||||||
|
<Property name="rows" type="int" value="5"/>
|
||||||
|
<Property name="focusable" type="boolean" value="false"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||||
|
<AbsoluteConstraints x="280" y="180" width="-1" height="-1"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<DimensionLayout dim="0">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="143" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="100" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
|
</Form>
|
361
src/main/java/vue/GameInterface.java
Normal file
361
src/main/java/vue/GameInterface.java
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
|
||||||
|
*/
|
||||||
|
package vue;
|
||||||
|
|
||||||
|
import java.awt.Image;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author steve.maingana
|
||||||
|
*/
|
||||||
|
public class GameInterface extends javax.swing.JFrame {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates new form GameInterface
|
||||||
|
*/
|
||||||
|
public GameInterface() {
|
||||||
|
initComponents();
|
||||||
|
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||||
|
System.out.println(this.getWidth());
|
||||||
|
System.out.println(this.getHeight());
|
||||||
|
initJeu();
|
||||||
|
jPMap.setSize(50,50);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialisation de l'interface de jeu
|
||||||
|
*/
|
||||||
|
public void initJeu() {
|
||||||
|
ImageIcon ImgIcon = new ImageIcon(getClass().getResource("/images/euMap.jpg"));
|
||||||
|
Image img = ImgIcon.getImage().getScaledInstance(850, 548, java.awt.Image.SCALE_DEFAULT);
|
||||||
|
this.jPMap.setSize(850,548);
|
||||||
|
this.jLMap.setText("");
|
||||||
|
this.jLMap.setIcon(new ImageIcon(img));
|
||||||
|
this.jPJoueurs.setSize(WIDTH, 548);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is called from within the constructor to initialize the form.
|
||||||
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
|
* regenerated by the Form Editor.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
|
private void initComponents() {
|
||||||
|
|
||||||
|
jPMap = new javax.swing.JPanel();
|
||||||
|
jLMap = new javax.swing.JLabel();
|
||||||
|
jPJoueurs = new javax.swing.JPanel();
|
||||||
|
jPanel2 = new javax.swing.JPanel();
|
||||||
|
jLabel6 = new javax.swing.JLabel();
|
||||||
|
jLabel7 = new javax.swing.JLabel();
|
||||||
|
jLabel9 = new javax.swing.JLabel();
|
||||||
|
jPanel3 = new javax.swing.JPanel();
|
||||||
|
jLabel11 = new javax.swing.JLabel();
|
||||||
|
jLabel12 = new javax.swing.JLabel();
|
||||||
|
jPanel4 = new javax.swing.JPanel();
|
||||||
|
jLabel16 = new javax.swing.JLabel();
|
||||||
|
jLabel17 = new javax.swing.JLabel();
|
||||||
|
jPanel5 = new javax.swing.JPanel();
|
||||||
|
jLabel21 = new javax.swing.JLabel();
|
||||||
|
jLabel22 = new javax.swing.JLabel();
|
||||||
|
jPanel6 = new javax.swing.JPanel();
|
||||||
|
jLabel26 = new javax.swing.JLabel();
|
||||||
|
jLabel27 = new javax.swing.JLabel();
|
||||||
|
jLabel1 = new javax.swing.JLabel();
|
||||||
|
jScrollPane2 = new javax.swing.JScrollPane();
|
||||||
|
jTextArea2 = new javax.swing.JTextArea();
|
||||||
|
jPanel7 = new javax.swing.JPanel();
|
||||||
|
|
||||||
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
setPreferredSize(new java.awt.Dimension(1056, 727));
|
||||||
|
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
|
||||||
|
|
||||||
|
jLMap.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||||
|
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||||
|
jLMapMouseClicked(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPMapLayout = new javax.swing.GroupLayout(jPMap);
|
||||||
|
jPMap.setLayout(jPMapLayout);
|
||||||
|
jPMapLayout.setHorizontalGroup(
|
||||||
|
jPMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(jLMap, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
jPMapLayout.setVerticalGroup(
|
||||||
|
jPMapLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(jLMap, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
|
||||||
|
getContentPane().add(jPMap, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));
|
||||||
|
|
||||||
|
jPJoueurs.setLayout(new java.awt.GridLayout(5, 1));
|
||||||
|
|
||||||
|
jPanel2.setBackground(new java.awt.Color(255, 0, 51));
|
||||||
|
|
||||||
|
jLabel6.setText("Icon");
|
||||||
|
|
||||||
|
jLabel7.setText("Pseudo");
|
||||||
|
|
||||||
|
jLabel9.setText("Score:");
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||||
|
jPanel2.setLayout(jPanel2Layout);
|
||||||
|
jPanel2Layout.setHorizontalGroup(
|
||||||
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
|
.addComponent(jLabel6)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 138, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel7)
|
||||||
|
.addGap(14, 14, 14))
|
||||||
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
|
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||||
|
);
|
||||||
|
jPanel2Layout.setVerticalGroup(
|
||||||
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(jLabel6)
|
||||||
|
.addComponent(jLabel7))
|
||||||
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(jLabel9)
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jPJoueurs.add(jPanel2);
|
||||||
|
|
||||||
|
jPanel3.setBackground(new java.awt.Color(102, 153, 255));
|
||||||
|
|
||||||
|
jLabel11.setText("Icon");
|
||||||
|
|
||||||
|
jLabel12.setText("Pseudo");
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||||
|
jPanel3.setLayout(jPanel3Layout);
|
||||||
|
jPanel3Layout.setHorizontalGroup(
|
||||||
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel11)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel12)
|
||||||
|
.addGap(16, 16, 16))
|
||||||
|
);
|
||||||
|
jPanel3Layout.setVerticalGroup(
|
||||||
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||||
|
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel11))
|
||||||
|
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||||
|
.addGap(17, 17, 17)
|
||||||
|
.addComponent(jLabel12)))
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jPJoueurs.add(jPanel3);
|
||||||
|
|
||||||
|
jPanel4.setBackground(new java.awt.Color(255, 102, 204));
|
||||||
|
|
||||||
|
jLabel16.setText("Icon");
|
||||||
|
|
||||||
|
jLabel17.setText("Pseudo");
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
||||||
|
jPanel4.setLayout(jPanel4Layout);
|
||||||
|
jPanel4Layout.setHorizontalGroup(
|
||||||
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel16)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel17)
|
||||||
|
.addGap(16, 16, 16))
|
||||||
|
);
|
||||||
|
jPanel4Layout.setVerticalGroup(
|
||||||
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel16))
|
||||||
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
||||||
|
.addGap(17, 17, 17)
|
||||||
|
.addComponent(jLabel17)))
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jPJoueurs.add(jPanel4);
|
||||||
|
|
||||||
|
jPanel5.setBackground(new java.awt.Color(51, 255, 51));
|
||||||
|
|
||||||
|
jLabel21.setText("Icon");
|
||||||
|
|
||||||
|
jLabel22.setText("Pseudo");
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
||||||
|
jPanel5.setLayout(jPanel5Layout);
|
||||||
|
jPanel5Layout.setHorizontalGroup(
|
||||||
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel21)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel22)
|
||||||
|
.addGap(16, 16, 16))
|
||||||
|
);
|
||||||
|
jPanel5Layout.setVerticalGroup(
|
||||||
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel21))
|
||||||
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||||
|
.addGap(17, 17, 17)
|
||||||
|
.addComponent(jLabel22)))
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jPJoueurs.add(jPanel5);
|
||||||
|
|
||||||
|
jPanel6.setBackground(new java.awt.Color(255, 255, 51));
|
||||||
|
|
||||||
|
jLabel26.setText("Icon");
|
||||||
|
|
||||||
|
jLabel27.setText("Pseudo");
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
|
||||||
|
jPanel6.setLayout(jPanel6Layout);
|
||||||
|
jPanel6Layout.setHorizontalGroup(
|
||||||
|
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel26)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
|
||||||
|
.addComponent(jLabel27)
|
||||||
|
.addGap(16, 16, 16))
|
||||||
|
);
|
||||||
|
jPanel6Layout.setVerticalGroup(
|
||||||
|
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||||
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel26))
|
||||||
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||||
|
.addGap(17, 17, 17)
|
||||||
|
.addComponent(jLabel27)))
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
);
|
||||||
|
|
||||||
|
jPJoueurs.add(jPanel6);
|
||||||
|
|
||||||
|
getContentPane().add(jPJoueurs, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 10, 220, 420));
|
||||||
|
|
||||||
|
jLabel1.setText("Pseudo: Choisissez une taille pour la route");
|
||||||
|
getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 128, -1, -1));
|
||||||
|
|
||||||
|
jTextArea2.setEditable(false);
|
||||||
|
jTextArea2.setColumns(20);
|
||||||
|
jTextArea2.setRows(5);
|
||||||
|
jTextArea2.setFocusable(false);
|
||||||
|
jScrollPane2.setViewportView(jTextArea2);
|
||||||
|
|
||||||
|
getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 173, -1, 179));
|
||||||
|
|
||||||
|
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
||||||
|
jPanel7.setLayout(jPanel7Layout);
|
||||||
|
jPanel7Layout.setHorizontalGroup(
|
||||||
|
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGap(0, 143, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
jPanel7Layout.setVerticalGroup(
|
||||||
|
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGap(0, 100, Short.MAX_VALUE)
|
||||||
|
);
|
||||||
|
|
||||||
|
getContentPane().add(jPanel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 180, -1, -1));
|
||||||
|
|
||||||
|
pack();
|
||||||
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
private void jLMapMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLMapMouseClicked
|
||||||
|
// TODO add your handling code here:
|
||||||
|
int x = evt.getX();
|
||||||
|
int y = evt.getY();
|
||||||
|
System.out.println("x"+x*2+"; y="+y*2);
|
||||||
|
}//GEN-LAST:event_jLMapMouseClicked
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param args the command line arguments
|
||||||
|
*/
|
||||||
|
public static void main(String args[]) {
|
||||||
|
/* Set the Nimbus look and feel */
|
||||||
|
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
||||||
|
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
||||||
|
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
||||||
|
if ("Nimbus".equals(info.getName())) {
|
||||||
|
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ClassNotFoundException ex) {
|
||||||
|
java.util.logging.Logger.getLogger(GameInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
} catch (InstantiationException ex) {
|
||||||
|
java.util.logging.Logger.getLogger(GameInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
java.util.logging.Logger.getLogger(GameInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
|
||||||
|
java.util.logging.Logger.getLogger(GameInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
|
//</editor-fold>
|
||||||
|
|
||||||
|
/* Create and display the form */
|
||||||
|
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
new GameInterface().setVisible(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JLabel jLMap;
|
||||||
|
private javax.swing.JLabel jLabel1;
|
||||||
|
private javax.swing.JLabel jLabel11;
|
||||||
|
private javax.swing.JLabel jLabel12;
|
||||||
|
private javax.swing.JLabel jLabel16;
|
||||||
|
private javax.swing.JLabel jLabel17;
|
||||||
|
private javax.swing.JLabel jLabel21;
|
||||||
|
private javax.swing.JLabel jLabel22;
|
||||||
|
private javax.swing.JLabel jLabel26;
|
||||||
|
private javax.swing.JLabel jLabel27;
|
||||||
|
private javax.swing.JLabel jLabel6;
|
||||||
|
private javax.swing.JLabel jLabel7;
|
||||||
|
private javax.swing.JLabel jLabel9;
|
||||||
|
private javax.swing.JPanel jPJoueurs;
|
||||||
|
private javax.swing.JPanel jPMap;
|
||||||
|
private javax.swing.JPanel jPanel2;
|
||||||
|
private javax.swing.JPanel jPanel3;
|
||||||
|
private javax.swing.JPanel jPanel4;
|
||||||
|
private javax.swing.JPanel jPanel5;
|
||||||
|
private javax.swing.JPanel jPanel6;
|
||||||
|
private javax.swing.JPanel jPanel7;
|
||||||
|
private javax.swing.JScrollPane jScrollPane2;
|
||||||
|
private javax.swing.JTextArea jTextArea2;
|
||||||
|
// End of variables declaration//GEN-END:variables
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user