1 Commits

Author SHA1 Message Date
e599f9e2d1 Début de familleMedicament et praticien 2025-03-11 20:33:51 +01:00
55 changed files with 322 additions and 1446 deletions

View File

@ -1,10 +1,9 @@
annotation.processing.enabled=true annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list= annotation.processing.processors.list=
annotation.processing.run.all.processors=true annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=GSBapplication
application.vendor=medhi.rodrigues
build.classes.dir=${build.dir}/classes build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned: # This directory is removed when the project is cleaned:
@ -33,13 +32,10 @@ dist.jar=${dist.dir}/GSBapplication.jar
dist.javadoc.dir=${dist.dir}/javadoc dist.javadoc.dir=${dist.dir}/javadoc
dist.jlink.dir=${dist.dir}/jlink dist.jlink.dir=${dist.dir}/jlink
dist.jlink.output=${dist.jlink.dir}/GSBapplication dist.jlink.output=${dist.jlink.dir}/GSBapplication
endorsed.classpath=
excludes= excludes=
file.reference.mysql-connector-j-8.3.0.jar=C:\\Users\\medhi.rodrigues\\Documents\\NetBeansProjects\\Driver\\mysql-connector-j-8.3.0.jar
includes=** includes=**
jar.compress=false jar.compress=false
javac.classpath=\ javac.classpath=
${file.reference.mysql-connector-j-8.3.0.jar}
# Space-separated list of extra javac options # Space-separated list of extra javac options
javac.compilerargs= javac.compilerargs=
javac.deprecation=false javac.deprecation=false
@ -52,7 +48,8 @@ javac.source=21
javac.target=21 javac.target=21
javac.test.classpath=\ javac.test.classpath=\
${javac.classpath}:\ ${javac.classpath}:\
${build.classes.dir} ${build.classes.dir}:\
${libs.junit_5.classpath}
javac.test.modulepath=\ javac.test.modulepath=\
${javac.modulepath} ${javac.modulepath}
javac.test.processorpath=\ javac.test.processorpath=\
@ -83,6 +80,10 @@ platform.active=default_platform
run.classpath=\ run.classpath=\
${javac.classpath}:\ ${javac.classpath}:\
${build.classes.dir} ${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.modulepath=\ run.modulepath=\
${javac.modulepath} ${javac.modulepath}
run.test.classpath=\ run.test.classpath=\

View File

@ -17,12 +17,12 @@ public class Medicament {
* contreindication = les contreindications du m<>dicament * contreindication = les contreindications du m<>dicament
* prix = le prix en unit<69> du m<>dicament * prix = le prix en unit<69> du m<>dicament
*/ */
private String id; private int id;
private String nom; private String nom;
private String composition; private String composition;
private String effet; private String effet;
private String contreindication; private String contreindication;
private String img; private float prix;
/** LE CONSTRUCTEUR DEFAULT /** LE CONSTRUCTEUR DEFAULT
@ -32,22 +32,24 @@ public class Medicament {
* @param composition * @param composition
* @param effet * @param effet
* @param contreindication * @param contreindication
* @param prix
*/ */
public Medicament(String id, String nom, String composition, String effet, String contreindication, String img) { public Medicament(int id, String nom, String composition, String effet, String contreindication, float prix) {
this.id = id; this.id = id;
this.nom = nom; this.nom = nom;
this.composition = composition; this.composition = composition;
this.effet = effet; this.effet = effet;
this.contreindication = contreindication; this.contreindication = contreindication;
this.img = img; this.prix = prix;
} }
/** LES GUETTEUR /** LES GUETTEUR
* @return the id * @return the id
*/ */
public String getId(){ public int getId() {
return id; return id;
} }
@ -79,15 +81,17 @@ public class Medicament {
return contreindication; return contreindication;
} }
public String getImg() { /**
return img; * @return the prix
*/
public float getPrix() {
return prix;
} }
@Override @Override
public String toString() { public String toString() {
return "Medicament{" + "id=" + id + ", nom=" + nom + ", composition=" + composition + ", effet=" + effet + ", contreindication=" + contreindication + ",img=" + img + '}'; return "Medicament{" + "id=" + id + ", nom=" + nom + ", composition=" + composition + ", effet=" + effet + ", contreindication=" + contreindication + ", prix=" + prix + '}';
} }
} }

View File

@ -0,0 +1,23 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package Metier;
/**
*
* @author lalor
*/
public class familleMedicament {
private String nomFamille;
public familleMedicament(String nom){
this.nomFamille = nom;
}
public String getNom(){
return this.getNom();
}
}

View File

@ -6,70 +6,78 @@ package Metier;
/** /**
* *
* @author medhi.rodrigues * @author lalor
*/ */
public class praticien { public class praticien {
/** private int idPraticien;
* id = L'identifiant du praticien private String nomPraticien;
* nom = le nom du praticien
* prenom = le prenom du praticien
* type_praticien = le type de praticien (ex : M<>decine de Ville)
*/
private int id;
private String nom;
private String prenom; private String prenom;
private String type_praticien; private String typePraticien;
/**
/** LE CONSTRUCTEUR DEFAULT * Constructeur de la classe praticien
* * avec une initialisation des variables
* @param id * @param idPraticien
* @param nom * @param nomPraticien
* @param prenom * @param prenom
* @param type_praticien * @param typePraticien
*/ */
public praticien(int id, String nom, String prenom, String type_praticien) { public praticien(int idPraticien, String nomPraticien, String prenom, String typePraticien) {
this.id = id; this.idPraticien = idPraticien;
this.nom = nom; this.nomPraticien = nomPraticien;
this.prenom = prenom; this.prenom = prenom;
this.type_praticien = type_praticien; this.typePraticien = typePraticien;
}
/**
* Getteur de l'id du pratitien
* @return idPraticien
*/
public int getIdPraticien() {
return this.idPraticien;
} }
//LES GETTEUR
/** /**
* @return the id * Getteur du nom du pratitien
* @return nomPraticien
*/ */
public int getId() { public String getNomPraticien() {
return id; return this.nomPraticien;
} }
/** /**
* @return the nom * Getteur du pr<70>nom du pratitien
*/ * @return prenom
public String getNom() {
return nom;
}
/**
* @return the prenom
*/ */
public String getPrenom() { public String getPrenom() {
return prenom; return this.prenom;
} }
/** /**
* @return the type_praticien * Getteur du type de pratitien
* @return typePraticien
*/ */
public String getType_praticien() { public String getTypePraticien() {
return type_praticien; return this.typePraticien;
} }
/**
* Fonction toString permettant
* de conna<6E>tre les valeures des attribut de l'objet
* @return valeurs des attributs
*/
@Override @Override
public String toString() { public String toString(){
return "Praticien{" + "id=" + id + ", nom=" + nom + ", prenom=" + prenom + ", type_praticien=" + type_praticien + '}'; return this.getIdPraticien() + this.getNomPraticien() + this.getPrenom() + this.getTypePraticien();
} }
} }

View File

@ -1,68 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package Metier;
/**
*
* @author medhi.rodrigues
*/
public class visiteur_medicaux {
/**
* id = l'identifiant du visiteur
* nom = le nom du visiteur
* prenom = le prenom du visiteur
* region = la region du visiteur
*/
private int id;
private String nom;
private String prenom;
private String region;
/** LE CONSTRUCTEUR DEFAULT
*
*
* @param id
* @param nom
* @param prenom
* @param region
*/
public visiteur_medicaux(int id, String nom, String prenom, String region) {
this.id = id;
this.nom = nom;
this.prenom = prenom;
this.region = region;
}
//LES GETTEUR
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @return the nom
*/
public String getNom() {
return nom;
}
/**
* @return the prenom
*/
public String getPrenom() {
return prenom;
}
/**
* @return the region
*/
public String getRegion() {
return region;
}
}

View File

@ -1,38 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
*/
package TEST;
/**
*
* @author medhi.rodrigues
*/
public class testMain {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
//Connection connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","adminGSB","mdpGSB");
//Elio
//Connection connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
//Yann
//Connection connexionTest = connexionSQL.getConnect("10.121.38.69","bdgsb","appliGSB","(Uq1XV0Tr01s2H9Z");
//praticienSQL a =new praticienSQL();
//a.rechercherPraticien("Didier", "1234");
//MedicamentSQL b = new MedicamentSQL();
//b.rechercherMedicament("3MYC7");
String id= "3MYC7";
String imgTrouve = "../img/"+ id +".jpg";
System.out.print(imgTrouve);
}
}

View File

@ -4,60 +4,10 @@
*/ */
package acces_aux_donnes; package acces_aux_donnes;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class MedicamentSQL { public class MedicamentSQL {
private Connection connexionTest;
private Statement stmt = null;
private ResultSet result = null;
public MedicamentSQL() {
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
}
public ArrayList<String> rechercherMedicament (String nomCo){
ArrayList<String> infoMedoc = new ArrayList<String>();
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT * FROM MEDICAMENT WHERE mNomCommercial ='"+nomCo+"';");
if(result.next()){
infoMedoc.add(result.getString(1));
infoMedoc.add(result.getString(2));
infoMedoc.add(result.getString(3));
infoMedoc.add(result.getString(4));
infoMedoc.add(result.getString(5));
infoMedoc.add(result.getString(6));
}
result.close();
stmt.close();
}catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return infoMedoc;
}
} }

View File

@ -1,60 +1,13 @@
package acces_aux_donnes;
/* /*
Connexion.java * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Classe permettant d'<27>tablir une connexion avec une base de donn<6E>es mySQL * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/ */
import java.sql.Connection; package acces_aux_donnes;
import java.sql.DriverManager;
/**
*
* @author emile.lalorcey
*/
public class connexionSQL { public class connexionSQL {
private static Connection connect; // Variable de connexion
/**
* Constructeur
* @param serveur nom du serveur, localhost si local
* @param bdd nom de la base de donn<6E>es
* @param nomUtil nom utilisateur
* @param mdp mot de passe li<6C> <20> l'utilisateur
*/
private connexionSQL(String serveur, String bdd, String nomUtil, String mdp) {
try {
// 1. Chargement du driver
//Class.forName("com.mysql.jdbc.Driver");
Class.forName("com.mysql.cj.jdbc.Driver");
System.out.println("Driver accessible");
// 2. Initialisation des param<61>tres de connexion
String host = serveur; // Serveur de bd
String dbname = bdd; // Nom bd
String url = "jdbc:mysql://" + host + "/" + dbname; // url de connexion
System.out.println("url : "+url);
String user = nomUtil; // nom du user
System.out.println("nomUtil : "+nomUtil);
String passwd = mdp; // mot de passe
System.out.println("mdp : "+mdp);
// 3. Connexion
connect = (Connection) DriverManager.getConnection(url, user, passwd);
System.out.println("Connexion r<>ussie !");
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Retourne la connection <20>tablie (Cr<43>ation d'une connection si elle n'existe pas)
* @param serveur nom du serveur, localhost si local
* @param bdd nom de la base de donn<6E>es
* @param nomUtil nom utilisateur
* @param mdp mot de passe li<6C> <20> l'utilisateur
* @return connection <20>tablie
*/
public static Connection getConnect(String serveur, String bdd, String nomUtil, String mdp) {
if (connect == null) {
new connexionSQL(serveur, bdd, nomUtil, mdp);
}
System.out.println("Connexion valid<69>");
return connect;
}
} }

View File

@ -4,97 +4,10 @@
*/ */
package acces_aux_donnes; package acces_aux_donnes;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Vector;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class familleMedocSQL { public class familleMedocSQL {
private Connection connexionTest;
private Statement stmt = null;
private ResultSet result = null;
public familleMedocSQL(){
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
}
public Vector<String> rechercheFamille(){
Vector<String> famille = new Vector<String>();
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT fLibelle FROM FAMILLE;");
while(result.next()) { // Le praticien a <20>t<EFBFBD> touv<75>
famille.add(result.getString(1));
}
result.close();
stmt.close();
}catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return famille;
}
public String rechercheCodeFamille(String libelle){
String code = "";
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT fCode FROM FAMILLE WHERE fLibelle ='"+ libelle +"';");
while(result.next()) { // Le praticien a <20>t<EFBFBD> touv<75>
code = result.getString(1);
}
result.close();
stmt.close();
}catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return code;
}
public Vector<String> rechercherMedocFamille(String libelle){
Vector<String> famille = new Vector<String>();
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT mNomCommercial FROM MEDICAMENT WHERE fCode ='"+ libelle +"';");
while(result.next()) { // Le praticien a <20>t<EFBFBD> touv<75>
famille.add(result.getString(1));
}
result.close();
stmt.close();
}catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return famille;
}
} }

View File

@ -4,60 +4,10 @@
*/ */
package acces_aux_donnes; package acces_aux_donnes;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class observationSQL { public class observationSQL {
private Connection connexionTest;
private Statement stmt = null;
private ResultSet result = null;
public observationSQL() {
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
}
public int compterLignes(){
int nbLignes = 0;
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT COUNT(idObservation) From OBSERVATION");
if (result.next()) {
nbLignes = Integer.parseInt(result.getString(1));
}
result.close();
stmt.close();
} catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return nbLignes;
}
public int ajouterObservation(String idMedoc, int idPraticien, String observation){
int passer = 1000;
int nbLignes = this.compterLignes();
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
passer = stmt.executeUpdate("INSERT INTO OBSERVATION(idObservation, idMedoc, idPraticien, observation) "
+ "VALUES ("+(nbLignes+1)+",'"+idMedoc+"',"+idPraticien+",\""+observation+"\");");
result.close();
stmt.close();
}catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return passer;
}
} }

View File

@ -4,44 +4,10 @@
*/ */
package acces_aux_donnes; package acces_aux_donnes;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class praticienSQL { public class praticienSQL {
private Connection connexionTest;
private Statement stmt = null;
private ResultSet result = null;
public praticienSQL() {
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
}
public String[] rechercherPraticien(String login, String mdp) {
String[] praticienCherche = new String [2];
try {
stmt = connexionTest.createStatement();
// Acc<63>s <20> la table
result = stmt.executeQuery("SELECT * FROM PRATICIENLOG WHERE id='"+login+
"' AND mdp='"+mdp + "';");
if (result.next()) { // Le praticien a <20>t<EFBFBD> touv<75>
praticienCherche[0] = result.getString(1);
praticienCherche[1] = result.getString(2);
}
result.close();
stmt.close();
} catch (SQLException ex) {
System.out.println("SQLException : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("Code erreur : " + ex.getErrorCode());
}
return praticienCherche;
}
} }

View File

@ -0,0 +1,13 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package acces_aux_donnes;
/**
*
* @author emile.lalorcey
*/
public class visiteurMedicalSQL {
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -23,84 +23,13 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="jLTitre" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="65" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="348" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="158" max="-2" attributes="0"/>
<Component id="jBsoumettre" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="23" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<Component id="jLTitre" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jScrollPane1" min="-2" pref="157" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jBsoumettre" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="46" max="32767" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/logodetoure.gif"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLTitre">
<Properties>
<Property name="text" type="java.lang.String" value="Soumettez votre observation"/>
</Properties>
</Component>
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JTextArea" name="jTAobservation">
<Properties>
<Property name="columns" type="int" value="20"/>
<Property name="rows" type="int" value="5"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="jBsoumettre">
<Properties>
<Property name="text" type="java.lang.String" value="Soumettre"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBsoumettreActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form> </Form>

View File

@ -4,22 +4,17 @@
*/ */
package presentation; package presentation;
import acces_aux_donnes.observationSQL;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class jffAjoutObservation extends javax.swing.JFrame { public class jffAjoutObservation extends javax.swing.JFrame {
private String idMedoc;
private int idPraticien;
/** /**
* Creates new form jffAjoutObservation * Creates new form jffAjoutObservation
*/ */
public jffAjoutObservation(String idMedoc,int idPraticien) { public jffAjoutObservation() {
initComponents(); initComponents();
this.idMedoc = idMedoc;
this.idPraticien = idPraticien;
} }
/** /**
@ -31,73 +26,22 @@ public class jffAjoutObservation extends javax.swing.JFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLTitre = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTAobservation = new javax.swing.JTextArea();
jBsoumettre = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
jLTitre.setText("Soumettez votre observation");
jTAobservation.setColumns(20);
jTAobservation.setRows(5);
jScrollPane1.setViewportView(jTAobservation);
jBsoumettre.setText("Soumettre");
jBsoumettre.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jBsoumettreActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 400, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLTitre)
.addGap(65, 65, 65)
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(23, 23, 23)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 348, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(158, 158, 158)
.addComponent(jBsoumettre)))
.addGap(0, 23, Short.MAX_VALUE)))
.addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 300, Short.MAX_VALUE)
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel1)
.addComponent(jLTitre))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jBsoumettre)
.addContainerGap(46, Short.MAX_VALUE))
); );
pack(); pack();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void jBsoumettreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBsoumettreActionPerformed
observationSQL observ = new observationSQL();
observ.ajouterObservation(this.idMedoc, this.idPraticien, jTAobservation.getText());
}//GEN-LAST:event_jBsoumettreActionPerformed
/** /**
* @param args the command line arguments * @param args the command line arguments
*/ */
@ -128,16 +72,11 @@ public class jffAjoutObservation extends javax.swing.JFrame {
/* Create and display the form */ /* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() { java.awt.EventQueue.invokeLater(new Runnable() {
public void run() { public void run() {
//new jffAjoutObservation().setVisible(true); new jffAjoutObservation().setVisible(true);
} }
}); });
} }
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jBsoumettre;
private javax.swing.JLabel jLTitre;
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTAobservation;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View File

@ -24,150 +24,110 @@
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="23" max="-2" attributes="0"/> <EmptySpace min="-2" pref="111" max="-2" attributes="0"/>
<Component id="jPFond" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0">
<EmptySpace pref="26" max="32767" attributes="0"/> <Group type="102" attributes="0">
<Component id="jBquitter" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jBValider" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="jLIdentifiant" max="32767" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jTFIdentifiant" min="-2" pref="71" max="-2" attributes="0"/>
</Group>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLmdp" min="-2" pref="86" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPFmdp" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="102" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace min="0" pref="6" max="32767" attributes="0"/> <Component id="jLabel2" min="-2" pref="38" max="-2" attributes="0"/>
<Component id="jPFond" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jTFIdentifiant" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLIdentifiant" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jPFmdp" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLmdp" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="52" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jBValider" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jBquitter" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="48" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JPanel" name="jPFond"> <Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Layout> <Property name="text" type="java.lang.String" value="Bonjour veuillez vous identifier"/>
<DimensionLayout dim="0"> </Properties>
<Group type="103" groupAlignment="0" attributes="0"> </Component>
<Group type="102" attributes="0"> <Component class="javax.swing.JTextField" name="jTFIdentifiant">
<EmptySpace min="-2" pref="141" max="-2" attributes="0"/> <Events>
<Component id="jBquitter" min="-2" max="-2" attributes="0"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTFIdentifiantActionPerformed"/>
<EmptySpace type="separate" max="-2" attributes="0"/> </Events>
<Component id="jBValider" min="-2" max="-2" attributes="0"/> </Component>
<EmptySpace max="32767" attributes="0"/> <Component class="javax.swing.JPasswordField" name="jPFmdp">
</Group> <Properties>
<Group type="102" alignment="0" attributes="0"> <Property name="text" type="java.lang.String" value="jPasswordField1"/>
<EmptySpace min="-2" pref="109" max="-2" attributes="0"/> </Properties>
<Group type="103" groupAlignment="1" attributes="0"> </Component>
<Group type="102" attributes="0"> <Component class="javax.swing.JButton" name="jBValider">
<Component id="jLBonjour" min="-2" max="-2" attributes="0"/> <Properties>
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
</Group> <Image iconType="3" name="/img/valider.png"/>
<Group type="102" alignment="1" attributes="0"> </Property>
<Group type="103" groupAlignment="0" attributes="0"> <Property name="text" type="java.lang.String" value="Valider"/>
<Group type="102" alignment="1" attributes="0"> </Properties>
<Component id="jLmdp" min="-2" pref="86" max="-2" attributes="0"/> </Component>
<EmptySpace max="-2" attributes="0"/> <Component class="javax.swing.JButton" name="jBquitter">
</Group> <Properties>
<Group type="102" alignment="0" attributes="0"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Component id="jLIdentifiant" min="-2" pref="73" max="-2" attributes="0"/> <Image iconType="3" name="/img/quitter.png"/>
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/> </Property>
</Group> <Property name="text" type="java.lang.String" value="Quitter"/>
</Group> </Properties>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> </Component>
<Component id="jTFIdentifiant" pref="90" max="32767" attributes="0"/> <Component class="javax.swing.JLabel" name="jLIdentifiant">
<Component id="jPFmdp" max="32767" attributes="0"/> <Properties>
</Group> <Property name="text" type="java.lang.String" value="Identifiant"/>
</Group> </Properties>
</Group> </Component>
<EmptySpace max="32767" attributes="0"/> <Component class="javax.swing.JLabel" name="jLmdp">
<Component id="jLLogo" min="-2" max="-2" attributes="0"/> <Properties>
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/> <Property name="text" type="java.lang.String" value="Mot de passe :"/>
</Group> </Properties>
</Group> </Component>
</DimensionLayout> <Component class="javax.swing.JLabel" name="jLabel2">
<DimensionLayout dim="1"> <Properties>
<Group type="103" groupAlignment="0" attributes="0"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Group type="102" alignment="0" attributes="0"> <Image iconType="3" name="/img/logodetoure.gif"/>
<Group type="103" groupAlignment="0" attributes="0"> </Property>
<Group type="102" attributes="0"> </Properties>
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/> </Component>
<Component id="jLBonjour" 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="jLLogo" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLIdentifiant" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTFIdentifiant" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLmdp" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jPFmdp" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="79" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jBquitter" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jBValider" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="45" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLBonjour">
<Properties>
<Property name="text" type="java.lang.String" value="Bonjour veuillez vous identifier :"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLIdentifiant">
<Properties>
<Property name="text" type="java.lang.String" value="Identifiant :"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="jTFIdentifiant">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTFIdentifiantActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLmdp">
<Properties>
<Property name="text" type="java.lang.String" value="Mot de passe :"/>
</Properties>
</Component>
<Component class="javax.swing.JPasswordField" name="jPFmdp">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jPFmdpActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jBquitter">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/quitter.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Quitter"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="jBValider">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/valider.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Valider"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBValiderActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLLogo">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/logodetoure.gif"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents> </SubComponents>
</Form> </Form>

View File

@ -4,21 +4,17 @@
*/ */
package presentation; package presentation;
import acces_aux_donnes.praticienSQL;
import javax.swing.JOptionPane;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
*/ */
public class jffConnexion extends javax.swing.JFrame { public class jffConnexion extends javax.swing.JFrame {
int profession;
/** /**
* Creates new form jffConnexion * Creates new form jffConnexion
*/ */
public jffConnexion(int indice) { public jffConnexion() {
initComponents(); initComponents();
this.profession = indice;
} }
/** /**
@ -30,21 +26,18 @@ public class jffConnexion extends javax.swing.JFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jPFond = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel();
jLBonjour = new javax.swing.JLabel();
jLIdentifiant = new javax.swing.JLabel();
jTFIdentifiant = new javax.swing.JTextField(); jTFIdentifiant = new javax.swing.JTextField();
jLmdp = new javax.swing.JLabel();
jPFmdp = new javax.swing.JPasswordField(); jPFmdp = new javax.swing.JPasswordField();
jBquitter = new javax.swing.JButton();
jBValider = new javax.swing.JButton(); jBValider = new javax.swing.JButton();
jLLogo = new javax.swing.JLabel(); jBquitter = new javax.swing.JButton();
jLIdentifiant = new javax.swing.JLabel();
jLmdp = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLBonjour.setText("Bonjour veuillez vous identifier :"); jLabel1.setText("Bonjour veuillez vous identifier");
jLIdentifiant.setText("Identifiant :");
jTFIdentifiant.addActionListener(new java.awt.event.ActionListener() { jTFIdentifiant.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -52,97 +45,66 @@ public class jffConnexion extends javax.swing.JFrame {
} }
}); });
jLmdp.setText("Mot de passe :"); jPFmdp.setText("jPasswordField1");
jPFmdp.addActionListener(new java.awt.event.ActionListener() { jBValider.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/valider.png"))); // NOI18N
public void actionPerformed(java.awt.event.ActionEvent evt) { jBValider.setText("Valider");
jPFmdpActionPerformed(evt);
}
});
jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N
jBquitter.setText("Quitter"); jBquitter.setText("Quitter");
jBValider.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/valider.png"))); // NOI18N jLIdentifiant.setText("Identifiant");
jBValider.setText("Valider");
jBValider.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jBValiderActionPerformed(evt);
}
});
jLLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N jLmdp.setText("Mot de passe :");
javax.swing.GroupLayout jPFondLayout = new javax.swing.GroupLayout(jPFond); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
jPFond.setLayout(jPFondLayout);
jPFondLayout.setHorizontalGroup(
jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(141, 141, 141)
.addComponent(jBquitter)
.addGap(18, 18, 18)
.addComponent(jBValider)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(109, 109, 109)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLBonjour)
.addGap(8, 8, 8))
.addGroup(jPFondLayout.createSequentialGroup()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPFondLayout.createSequentialGroup()
.addComponent(jLmdp, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLIdentifiant, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(19, 19, 19)))
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTFIdentifiant, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
.addComponent(jPFmdp))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLLogo)
.addGap(26, 26, 26))
);
jPFondLayout.setVerticalGroup(
jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(jLBonjour))
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(17, 17, 17)
.addComponent(jLLogo)))
.addGap(29, 29, 29)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLIdentifiant)
.addComponent(jTFIdentifiant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLmdp)
.addComponent(jPFmdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jBquitter)
.addComponent(jBValider))
.addGap(45, 45, 45))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(23, 23, 23) .addGap(111, 111, 111)
.addComponent(jPFond, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addContainerGap(26, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup()
.addComponent(jBquitter)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jBValider))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(jLIdentifiant, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(jTFIdentifiant, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addComponent(jLmdp, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPFmdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(102, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2)
.addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGap(0, 6, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPFond, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4)
.addComponent(jLabel1)
.addGap(48, 48, 48)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTFIdentifiant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLIdentifiant))
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jPFmdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLmdp))
.addGap(52, 52, 52)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jBValider)
.addComponent(jBquitter))
.addContainerGap(48, Short.MAX_VALUE))
); );
pack(); pack();
@ -152,23 +114,6 @@ public class jffConnexion extends javax.swing.JFrame {
// TODO add your handling code here: // TODO add your handling code here:
}//GEN-LAST:event_jTFIdentifiantActionPerformed }//GEN-LAST:event_jTFIdentifiantActionPerformed
private void jPFmdpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jPFmdpActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jPFmdpActionPerformed
private void jBValiderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBValiderActionPerformed
String identifiant = jTFIdentifiant.getText();
String mdp = String.valueOf(jPFmdp.getPassword());
praticienSQL testPraticien = new praticienSQL();
String [] lePraticien = testPraticien.rechercherPraticien(identifiant,mdp);
if (lePraticien[0] != null){
System.out.print("TEST REUSSIE");
JOptionPane.showMessageDialog(null,"Bienvenue" + lePraticien[1]);
}else {
JOptionPane.showMessageDialog(null, "Erreur d'authentification, veuillez r<>esayer");
}
}//GEN-LAST:event_jBValiderActionPerformed
/** /**
* @param args the command line arguments * @param args the command line arguments
*/ */
@ -199,7 +144,7 @@ public class jffConnexion extends javax.swing.JFrame {
/* Create and display the form */ /* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() { java.awt.EventQueue.invokeLater(new Runnable() {
public void run() { public void run() {
new jffConnexion(1).setVisible(true); new jffConnexion().setVisible(true);
} }
}); });
} }
@ -207,12 +152,11 @@ public class jffConnexion extends javax.swing.JFrame {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jBValider; private javax.swing.JButton jBValider;
private javax.swing.JButton jBquitter; private javax.swing.JButton jBquitter;
private javax.swing.JLabel jLBonjour;
private javax.swing.JLabel jLIdentifiant; private javax.swing.JLabel jLIdentifiant;
private javax.swing.JLabel jLLogo; private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLmdp; private javax.swing.JLabel jLmdp;
private javax.swing.JPasswordField jPFmdp; private javax.swing.JPasswordField jPFmdp;
private javax.swing.JPanel jPFond;
private javax.swing.JTextField jTFIdentifiant; private javax.swing.JTextField jTFIdentifiant;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View File

@ -1,48 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<NonVisualComponents>
<Menu class="javax.swing.JMenuBar" name="jMenuBar1">
<SubComponents>
<Menu class="javax.swing.JMenu" name="jMenu1">
<Properties>
<Property name="text" type="java.lang.String" value="File"/>
</Properties>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="jMIAPropos">
<Properties>
<Property name="text" type="java.lang.String" value="&#xe0; propos"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIAProposActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="jMIQuitter">
<Properties>
<Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">
<KeyStroke key="Alt+F4"/>
</Property>
<Property name="text" type="java.lang.String" value="Quitter"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIQuitterActionPerformed"/>
</Events>
</MenuItem>
</SubComponents>
</Menu>
<Menu class="javax.swing.JMenu" name="jMenu2">
<Properties>
<Property name="text" type="java.lang.String" value="Edit"/>
</Properties>
</Menu>
</SubComponents>
</Menu>
</NonVisualComponents>
<Properties> <Properties>
<Property name="defaultCloseOperation" type="int" value="3"/> <Property name="defaultCloseOperation" type="int" value="3"/>
</Properties> </Properties>
<SyntheticProperties> <SyntheticProperties>
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/> <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/> <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties> </SyntheticProperties>
@ -61,124 +23,13 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="jLRecherche" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jTFRecherche" min="-2" pref="80" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="58" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jCBFamille" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jBRechercheValide" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jCBMedocListe" min="-2" pref="176" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLRecherche" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTFRecherche" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jBRechercheValide" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jCBFamille" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jCBMedocListe" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="264" max="32767" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/logodetoure.gif"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLRecherche">
<Properties>
<Property name="text" type="java.lang.String" value="Recherche m&#xe9;dicament : "/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="jTFRecherche">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTFRechercheActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="jBRechercheValide">
<Properties>
<Property name="text" type="java.lang.String" value="Rechercher"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBRechercheValideActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JComboBox" name="jCBFamille">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCBFamilleActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JComboBox" name="jCBMedocListe">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCBMedocListeActionPerformed"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
</SubComponents>
</Form> </Form>

View File

@ -4,14 +4,6 @@
*/ */
package presentation; package presentation;
import Metier.Medicament;
import acces_aux_donnes.MedicamentSQL;
import acces_aux_donnes.familleMedocSQL;
import java.util.ArrayList;
import java.util.Vector;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
@ -23,8 +15,6 @@ public class jffFamilleMedoc extends javax.swing.JFrame {
*/ */
public jffFamilleMedoc() { public jffFamilleMedoc() {
initComponents(); initComponents();
familleMedocSQL famille = new familleMedocSQL();
jCBFamille.setModel(new DefaultComboBoxModel(famille.rechercheFamille()));
} }
/** /**
@ -36,190 +26,22 @@ public class jffFamilleMedoc extends javax.swing.JFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLRecherche = new javax.swing.JLabel();
jTFRecherche = new javax.swing.JTextField();
jBRechercheValide = new javax.swing.JButton();
jCBFamille = new javax.swing.JComboBox<>();
jCBMedocListe = new javax.swing.JComboBox<>();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMIAPropos = new javax.swing.JMenuItem();
jMIQuitter = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
jLRecherche.setText("Recherche m<>dicament : ");
jTFRecherche.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTFRechercheActionPerformed(evt);
}
});
jBRechercheValide.setText("Rechercher");
jBRechercheValide.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jBRechercheValideActionPerformed(evt);
}
});
jCBFamille.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
jCBFamille.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCBFamilleActionPerformed(evt);
}
});
jCBMedocListe.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
jCBMedocListe.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCBMedocListeActionPerformed(evt);
}
});
jMenu1.setText("File");
jMIAPropos.setText("<EFBFBD> propos");
jMIAPropos.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMIAProposActionPerformed(evt);
}
});
jMenu1.add(jMIAPropos);
jMIQuitter.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_DOWN_MASK));
jMIQuitter.setText("Quitter");
jMIQuitter.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMIQuitterActionPerformed(evt);
}
});
jMenu1.add(jMIQuitter);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 400, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLRecherche)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTFRecherche, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(58, 58, 58))
.addGroup(layout.createSequentialGroup()
.addComponent(jCBFamille, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(42, 42, 42)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jBRechercheValide)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jCBMedocListe, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(31, 31, 31))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1)))
.addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 300, Short.MAX_VALUE)
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLRecherche)
.addComponent(jTFRecherche, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jBRechercheValide))
.addGap(29, 29, 29)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jCBFamille, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jCBMedocListe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(264, Short.MAX_VALUE))
); );
pack(); pack();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void jTFRechercheActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFRechercheActionPerformed
}//GEN-LAST:event_jTFRechercheActionPerformed
private void jBRechercheValideActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRechercheValideActionPerformed
String medocRechercher = jTFRecherche.getText();
System.out.println(medocRechercher);
MedicamentSQL medocTest = new MedicamentSQL();
ArrayList<String> rechercheMedoc = new ArrayList<String>();
rechercheMedoc = medocTest.rechercherMedicament(medocRechercher);
if (rechercheMedoc.get(0) != null) {
String idTrouve = rechercheMedoc.get(0);
String nomTrouve = rechercheMedoc.get(1);
String compositionTrouve = rechercheMedoc.get(2);
String effetTrouve = rechercheMedoc.get(3);
String contreIndicationTrouve = rechercheMedoc.get(4);
String imgTrouve = idTrouve;
Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve, contreIndicationTrouve,imgTrouve);
new jffInfoMedoc(medocTrouve).setVisible(true);
}else {
JOptionPane.showMessageDialog(null,"Erreur, Veuillez r<>esayer"); }
}//GEN-LAST:event_jBRechercheValideActionPerformed
private void jCBFamilleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBFamilleActionPerformed
familleMedocSQL famille = new familleMedocSQL();
Vector<String> medocFamille = new Vector<String>();
String libelleFamille = jCBFamille.getSelectedItem().toString();
String codeFamille = famille.rechercheCodeFamille(libelleFamille);
medocFamille = famille.rechercherMedocFamille(codeFamille);
jCBMedocListe.setModel(new DefaultComboBoxModel(medocFamille));
}//GEN-LAST:event_jCBFamilleActionPerformed
private void jCBMedocListeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMedocListeActionPerformed
String nomMedoc = jCBMedocListe.getSelectedItem().toString();
System.out.println(nomMedoc);
MedicamentSQL medocTest = new MedicamentSQL();
ArrayList<String> rechercheMedoc = new ArrayList<String>();
rechercheMedoc = medocTest.rechercherMedicament(nomMedoc);
System.out.print("TEst");
if (rechercheMedoc.get(0) != null) {
String idTrouve = rechercheMedoc.get(0);
String nomTrouve = rechercheMedoc.get(1);
String compositionTrouve = rechercheMedoc.get(2);
String effetTrouve = rechercheMedoc.get(3);
String contreIndicationTrouve = rechercheMedoc.get(4);
String imgTrouve = idTrouve;
Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve, contreIndicationTrouve,imgTrouve);
new jffInfoMedoc(medocTrouve).setVisible(true);
}
}//GEN-LAST:event_jCBMedocListeActionPerformed
private void jMIAProposActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIAProposActionPerformed
JOptionPane.showMessageDialog(null,"Fait par Medhi et un Raciste");
}//GEN-LAST:event_jMIAProposActionPerformed
private void jMIQuitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIQuitterActionPerformed
System.exit(0);
}//GEN-LAST:event_jMIQuitterActionPerformed
/** /**
* @param args the command line arguments * @param args the command line arguments
*/ */
@ -256,16 +78,5 @@ public class jffFamilleMedoc extends javax.swing.JFrame {
} }
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jBRechercheValide;
private javax.swing.JComboBox<String> jCBFamille;
private javax.swing.JComboBox<String> jCBMedocListe;
private javax.swing.JLabel jLRecherche;
private javax.swing.JLabel jLabel1;
private javax.swing.JMenuItem jMIAPropos;
private javax.swing.JMenuItem jMIQuitter;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JTextField jTFRecherche;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View File

@ -23,126 +23,13 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPFond" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
<Component id="jPFond" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
</Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPFond">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jSeparator1" alignment="1" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLContrindication" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLEffet" min="-2" pref="166" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLComposition" min="-2" pref="265" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="140" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="183" max="-2" attributes="0"/>
<Component id="jLNomCo" min="-2" pref="144" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="78" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="jLImage" min="-2" pref="157" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="168" max="-2" attributes="0"/>
<Component id="jLNomMedoc" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="163" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLNomMedoc" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jLNomCo" min="-2" pref="37" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
<Component id="jLComposition" min="-2" pref="74" max="-2" attributes="0"/>
<EmptySpace pref="60" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jLContrindication" min="-2" pref="141" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="jSeparator1" min="-2" pref="10" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="169" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLEffet" min="-2" pref="131" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</Group>
<Group type="102" attributes="0">
<Component id="jLImage" min="-2" pref="172" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLNomMedoc">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Segoe UI Black" size="18" style="0"/>
</Property>
<Property name="text" type="java.lang.String" value="Nom du M&#xe9;dicament :"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLNomCo">
</Component>
<Component class="javax.swing.JLabel" name="jLComposition">
</Component>
<Component class="javax.swing.JLabel" name="jLContrindication">
</Component>
<Component class="javax.swing.JLabel" name="jLImage">
</Component>
<Component class="javax.swing.JSeparator" name="jSeparator1">
</Component>
<Component class="javax.swing.JLabel" name="jLEffet">
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form> </Form>

View File

@ -4,12 +4,6 @@
*/ */
package presentation; package presentation;
import Metier.Medicament;
import java.awt.Image;
import java.awt.image.BufferedImage;
import javax.swing.Icon;
import javax.swing.ImageIcon;
/** /**
* *
* @author emile.lalorcey * @author emile.lalorcey
@ -19,17 +13,8 @@ public class jffInfoMedoc extends javax.swing.JFrame {
/** /**
* Creates new form jffInfoMedoc * Creates new form jffInfoMedoc
*/ */
public jffInfoMedoc(Medicament medocTrouve) { public jffInfoMedoc() {
initComponents(); initComponents();
jLNomCo.setText(medocTrouve.getNom());
//Icon imgMedoc = new javax.swing.ImageIcon(getClass().getResource("/img/" + medocTrouve.getImg() + ".jpg"));
//jLImage.setIcon(imgMedoc);
BufferedImage imgResize = null;
jLImage.setIcon(new ImageIcon(new javax.swing.ImageIcon(getClass().getResource("/img/" + medocTrouve.getImg() + ".jpg")).getImage().getScaledInstance(200, 50, Image.SCALE_SMOOTH)));
jLComposition.setText(medocTrouve.getComposition());
jLContrindication.setText(medocTrouve.getContreindication());
jLEffet.setText(medocTrouve.getEffet());
} }
/** /**
@ -41,93 +26,17 @@ public class jffInfoMedoc extends javax.swing.JFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jPFond = new javax.swing.JPanel();
jLNomMedoc = new javax.swing.JLabel();
jLNomCo = new javax.swing.JLabel();
jLComposition = new javax.swing.JLabel();
jLContrindication = new javax.swing.JLabel();
jLImage = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jLEffet = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLNomMedoc.setFont(new java.awt.Font("Segoe UI Black", 0, 18)); // NOI18N
jLNomMedoc.setText("Nom du M<>dicament :");
javax.swing.GroupLayout jPFondLayout = new javax.swing.GroupLayout(jPFond);
jPFond.setLayout(jPFondLayout);
jPFondLayout.setHorizontalGroup(
jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPFondLayout.createSequentialGroup()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLContrindication, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLEffet, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPFondLayout.createSequentialGroup()
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPFondLayout.createSequentialGroup()
.addComponent(jLComposition, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(140, 140, 140))
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(183, 183, 183)
.addComponent(jLNomCo, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(78, 78, 78)))
.addComponent(jLImage, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(38, 38, 38))))
.addGroup(jPFondLayout.createSequentialGroup()
.addGap(168, 168, 168)
.addComponent(jLNomMedoc)))
.addGap(0, 163, Short.MAX_VALUE)))
.addContainerGap())
);
jPFondLayout.setVerticalGroup(
jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLNomMedoc)
.addGap(18, 18, 18)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLNomCo, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addComponent(jLComposition, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 60, Short.MAX_VALUE)
.addGroup(jPFondLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLContrindication, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(169, 169, 169))
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLEffet, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addGroup(jPFondLayout.createSequentialGroup()
.addComponent(jLImage, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 400, Short.MAX_VALUE)
.addContainerGap()
.addComponent(jPFond, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGap(0, 300, Short.MAX_VALUE)
.addComponent(jPFond, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(16, 16, 16))
); );
pack(); pack();
@ -163,18 +72,11 @@ public class jffInfoMedoc extends javax.swing.JFrame {
/* Create and display the form */ /* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() { java.awt.EventQueue.invokeLater(new Runnable() {
public void run() { public void run() {
new jffInfoMedoc().setVisible(true);
} }
}); });
} }
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLComposition;
private javax.swing.JLabel jLContrindication;
private javax.swing.JLabel jLEffet;
private javax.swing.JLabel jLImage;
private javax.swing.JLabel jLNomCo;
private javax.swing.JLabel jLNomMedoc;
private javax.swing.JPanel jPFond;
private javax.swing.JSeparator jSeparator1;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View File

@ -26,18 +26,18 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/>
<Component id="jLChoixPro" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="46" max="32767" attributes="0"/>
<Component id="jLLogo" min="-2" pref="73" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Component id="jBpraticien" min="-2" pref="94" max="-2" attributes="0"/> <Component id="jBpraticien" min="-2" pref="94" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="147" max="-2" attributes="0"/> <EmptySpace min="-2" pref="147" max="-2" attributes="0"/>
</Group> </Group>
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/>
<Component id="jLChoixPro" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="69" max="32767" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
@ -47,7 +47,7 @@
</Group> </Group>
<Group type="102" alignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0">
<Component id="jBvisiteurMedical" min="-2" max="-2" attributes="0"/> <Component id="jBvisiteurMedical" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/> <EmptySpace min="-2" pref="136" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</Group> </Group>
@ -56,23 +56,18 @@
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/>
<Group type="102" attributes="0"> <Group type="103" groupAlignment="1" attributes="0">
<EmptySpace min="-2" pref="25" max="-2" attributes="0"/> <Component id="jLChoixPro" min="-2" max="-2" attributes="0"/>
<Component id="jLChoixPro" min="-2" max="-2" attributes="0"/> <Component id="jLabel2" min="-2" pref="38" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLLogo" min="-2" pref="52" max="-2" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/> <EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
<Component id="jBpraticien" min="-2" pref="31" max="-2" attributes="0"/> <Component id="jBpraticien" min="-2" pref="31" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/> <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
<Component id="jBvisiteurMedical" min="-2" pref="31" max="-2" attributes="0"/> <Component id="jBvisiteurMedical" min="-2" pref="31" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="37" max="-2" attributes="0"/> <EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
<Component id="jBquitter" min="-2" max="-2" attributes="0"/> <Component id="jBquitter" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="60" max="32767" attributes="0"/> <EmptySpace pref="57" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -95,9 +90,6 @@
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="visiteur medical"/> <Property name="text" type="java.lang.String" value="visiteur medical"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBvisiteurMedicalActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JButton" name="jBquitter"> <Component class="javax.swing.JButton" name="jBquitter">
<Properties> <Properties>
@ -110,7 +102,7 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBquitterActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBquitterActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLLogo"> <Component class="javax.swing.JLabel" name="jLabel2">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/img/logodetoure.gif"/> <Image iconType="3" name="/img/logodetoure.gif"/>

View File

@ -30,7 +30,7 @@ public class jffProfession extends javax.swing.JFrame {
jBpraticien = new javax.swing.JButton(); jBpraticien = new javax.swing.JButton();
jBvisiteurMedical = new javax.swing.JButton(); jBvisiteurMedical = new javax.swing.JButton();
jBquitter = new javax.swing.JButton(); jBquitter = new javax.swing.JButton();
jLLogo = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(255, 102, 153)); setBackground(new java.awt.Color(255, 102, 153));
@ -45,11 +45,6 @@ public class jffProfession extends javax.swing.JFrame {
}); });
jBvisiteurMedical.setText("visiteur medical"); jBvisiteurMedical.setText("visiteur medical");
jBvisiteurMedical.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jBvisiteurMedicalActionPerformed(evt);
}
});
jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N
jBquitter.setText("Quitter"); jBquitter.setText("Quitter");
@ -59,22 +54,22 @@ public class jffProfession extends javax.swing.JFrame {
} }
}); });
jLLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(137, 137, 137)
.addComponent(jLChoixPro)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE) .addGap(0, 0, Short.MAX_VALUE)
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(147, 147, 147)) .addGap(147, 147, 147))
.addGroup(layout.createSequentialGroup()
.addGap(137, 137, 137)
.addComponent(jLChoixPro)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)
.addComponent(jLabel2)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -83,44 +78,35 @@ public class jffProfession extends javax.swing.JFrame {
.addGap(149, 149, 149)) .addGap(149, 149, 149))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jBvisiteurMedical) .addComponent(jBvisiteurMedical)
.addGap(137, 137, 137)))) .addGap(136, 136, 136))))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addContainerGap()
.addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGap(25, 25, 25) .addComponent(jLChoixPro)
.addComponent(jLChoixPro)) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup() .addGap(59, 59, 59)
.addContainerGap()
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(42, 42, 42)
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18) .addGap(29, 29, 29)
.addComponent(jBvisiteurMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jBvisiteurMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(37, 37, 37) .addGap(26, 26, 26)
.addComponent(jBquitter) .addComponent(jBquitter)
.addContainerGap(60, Short.MAX_VALUE)) .addContainerGap(57, Short.MAX_VALUE))
); );
pack(); pack();
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed
new jffConnexion(0).setVisible(true); // TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_jBpraticienActionPerformed }//GEN-LAST:event_jBpraticienActionPerformed
private void jBquitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBquitterActionPerformed private void jBquitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBquitterActionPerformed
System.exit(0); System.exit(0);
}//GEN-LAST:event_jBquitterActionPerformed }//GEN-LAST:event_jBquitterActionPerformed
private void jBvisiteurMedicalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBvisiteurMedicalActionPerformed
new jffConnexion(1).setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_jBvisiteurMedicalActionPerformed
/** /**
* @param args the command line arguments * @param args the command line arguments
*/ */
@ -161,6 +147,6 @@ public class jffProfession extends javax.swing.JFrame {
private javax.swing.JButton jBquitter; private javax.swing.JButton jBquitter;
private javax.swing.JButton jBvisiteurMedical; private javax.swing.JButton jBvisiteurMedical;
private javax.swing.JLabel jLChoixPro; private javax.swing.JLabel jLChoixPro;
private javax.swing.JLabel jLLogo; private javax.swing.JLabel jLabel2;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }