Correction Bug avec WindowBuilder
This commit is contained in:
parent
ce81774df8
commit
4009b01d22
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -11,9 +11,12 @@ import javax.swing.SwingConstants;
|
||||
|
||||
import MEPTL.commandes;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class about extends JFrame{
|
||||
public class about extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
@ -61,12 +64,12 @@ public class about extends JFrame{
|
||||
lblNewLabelTitre.setIcon(img2);
|
||||
lblNewLabelTitre.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblNewLabelTitre.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
||||
lblNewLabelTitre.setBounds(10, 10, 357, 69);
|
||||
lblNewLabelTitre.setBounds(10, 10, 357, 90);
|
||||
contentPane.add(lblNewLabelTitre);
|
||||
|
||||
JLabel lblNewLabelVersion = new JLabel("<HTML><B><U>Version :</U></B> " + commandes.version + "</HTML>");
|
||||
lblNewLabelVersion.setFont(new Font("Tahoma", Font.PLAIN, 16));
|
||||
lblNewLabelVersion.setBounds(20, 80, 240, 20);
|
||||
lblNewLabelVersion.setBounds(20, 90, 240, 20);
|
||||
contentPane.add(lblNewLabelVersion);
|
||||
|
||||
JLabel lblNewLabelAnnee = new JLabel("<HTML><B><U>Année :</U></B> " + commandes.Annee + "</HTML>");
|
||||
@ -106,4 +109,5 @@ public class about extends JFrame{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,25 @@
|
||||
package app;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextPane;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
@ -12,31 +28,10 @@ import org.xml.sax.SAXException;
|
||||
import MEPTL.commandes;
|
||||
import MEPTL.feedbacks;
|
||||
import MEPTL.meptl;
|
||||
import MEPTL.verificationFichierAnalyse;
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JLabel;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridBagConstraints;
|
||||
import javax.swing.JCheckBox;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Font;
|
||||
import javax.swing.JSeparator;
|
||||
import javax.swing.JTextPane;
|
||||
import java.awt.Color;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class evaluate extends JFrame {
|
||||
|
||||
/**
|
||||
@ -362,4 +357,5 @@ public class evaluate extends JFrame {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
@ -16,15 +15,16 @@ import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import MEPTL.commandes;
|
||||
import MEPTL.meptl;
|
||||
import MEPTL.verificationFichierAnalyse;
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
|
||||
public class filechooserXML extends JFileChooser {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class filechooserXML extends JFileChooser{
|
||||
|
||||
|
||||
public filechooserXML() {
|
||||
setDialogTitle("Choisir un fichier d'analyse");
|
||||
|
||||
@ -135,6 +135,5 @@ public class filechooserXML extends JFileChooser{
|
||||
if(!commandes.sujet.getNomElt().equals("fichier")) {System.out.println("Pas de node fichier."); return false;}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package app;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Font;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
@ -13,128 +15,126 @@ import javax.swing.SwingConstants;
|
||||
|
||||
import MEPTL.commandes;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class mainApp extends JFrame implements ActionListener {
|
||||
public class mainApp extends JFrame implements ActionListener{
|
||||
|
||||
//public static final String LOOK_AND_FEEL_1 = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
|
||||
|
||||
private JFrame frmEvalwriter;
|
||||
// public static JFrame Creer ;
|
||||
|
||||
JButton btnCreate;
|
||||
JButton actCharge;
|
||||
JButton aPropos;
|
||||
private JButton btnCrerUnFichier;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
commandes.console=false;
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
mainApp window = new mainApp();
|
||||
window.frmEvalwriter.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private JFrame frmEvalwriter;
|
||||
// public static JFrame Creer ;
|
||||
|
||||
JButton btnCreate;
|
||||
JButton actCharge;
|
||||
JButton aPropos;
|
||||
private JButton btnCrerUnFichier;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
commandes.console=false;
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
mainApp window = new mainApp();
|
||||
window.frmEvalwriter.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public mainApp() {
|
||||
initialize();
|
||||
}
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public mainApp() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
|
||||
frmEvalwriter = new JFrame();
|
||||
frmEvalwriter.setIconImage(Toolkit.getDefaultToolkit().getImage(mainApp.class.getResource("/resources/evalwriter.ico")));
|
||||
frmEvalwriter.setResizable(false);
|
||||
frmEvalwriter.setTitle("analyseWriter");
|
||||
frmEvalwriter.setBounds(100, 100, 555, 457);
|
||||
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frmEvalwriter.getContentPane().setLayout(null);
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
setIconImage(img.getImage());
|
||||
|
||||
btnCreate = new JButton("Modifier un fichier d'analyse");
|
||||
btnCreate.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
btnCreate.addActionListener(this);
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
|
||||
btnCreate.setBounds(34, 163, 470, 50);
|
||||
frmEvalwriter.getContentPane().add(btnCreate);
|
||||
|
||||
actCharge = new JButton("Charge le fichier d'analyse pour évaluer les fichiers des étudiants");
|
||||
actCharge.setBackground(Color.PINK);
|
||||
actCharge.addActionListener(this);
|
||||
actCharge.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
actCharge.setBounds(34, 96, 470, 45);
|
||||
frmEvalwriter.getContentPane().add(actCharge);
|
||||
|
||||
JLabel lblNewLabel = new JLabel();
|
||||
ImageIcon img2 = new ImageIcon(getClass().getResource("/accueil.png") );
|
||||
lblNewLabel.setIcon(img2);
|
||||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
||||
lblNewLabel.setBounds(34, 11, 470, 74);
|
||||
frmEvalwriter.getContentPane().add(lblNewLabel);
|
||||
|
||||
aPropos = new JButton("A Propos");
|
||||
aPropos.addActionListener(this);
|
||||
aPropos.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
aPropos.setBounds(34, 326, 161, 50);
|
||||
frmEvalwriter.getContentPane().add(aPropos);
|
||||
|
||||
btnCrerUnFichier = new JButton("Créer un fichier d'analyse à partir d'un fichier ODF");
|
||||
btnCrerUnFichier.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
}
|
||||
});
|
||||
btnCrerUnFichier.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
btnCrerUnFichier.setBounds(34, 235, 470, 50);
|
||||
frmEvalwriter.getContentPane().add(btnCrerUnFichier);
|
||||
}
|
||||
frmEvalwriter = new JFrame();
|
||||
frmEvalwriter.setIconImage(Toolkit.getDefaultToolkit().getImage(mainApp.class.getResource("/resources/evalwriter.ico")));
|
||||
frmEvalwriter.setResizable(false);
|
||||
frmEvalwriter.setTitle("analyseWriter");
|
||||
frmEvalwriter.setBounds(100, 100, 555, 457);
|
||||
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frmEvalwriter.getContentPane().setLayout(null);
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
setIconImage(img.getImage());
|
||||
|
||||
btnCreate = new JButton("Modifier un fichier d'analyse");
|
||||
btnCreate.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
btnCreate.addActionListener(this);
|
||||
|
||||
btnCreate.setBounds(34, 163, 470, 50);
|
||||
frmEvalwriter.getContentPane().add(btnCreate);
|
||||
|
||||
actCharge = new JButton("Charge le fichier d'analyse pour évaluer les fichiers des étudiants");
|
||||
actCharge.setBackground(Color.PINK);
|
||||
actCharge.addActionListener(this);
|
||||
actCharge.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
actCharge.setBounds(34, 96, 470, 45);
|
||||
frmEvalwriter.getContentPane().add(actCharge);
|
||||
|
||||
JLabel lblNewLabel = new JLabel();
|
||||
ImageIcon img2 = new ImageIcon(getClass().getResource("/accueil.png") );
|
||||
lblNewLabel.setIcon(img2);
|
||||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
||||
lblNewLabel.setBounds(34, 11, 470, 74);
|
||||
frmEvalwriter.getContentPane().add(lblNewLabel);
|
||||
|
||||
aPropos = new JButton("A Propos");
|
||||
aPropos.addActionListener(this);
|
||||
aPropos.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
aPropos.setBounds(34, 326, 161, 50);
|
||||
frmEvalwriter.getContentPane().add(aPropos);
|
||||
|
||||
btnCrerUnFichier = new JButton("Créer un fichier d'analyse à partir d'un fichier ODF");
|
||||
btnCrerUnFichier.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
}
|
||||
});
|
||||
btnCrerUnFichier.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
btnCrerUnFichier.setBounds(34, 235, 470, 50);
|
||||
frmEvalwriter.getContentPane().add(btnCrerUnFichier);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(e.getSource()==btnCreate) {
|
||||
// Creer = new create();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
if(e.getSource()==actCharge) {
|
||||
if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." );
|
||||
new filechooserXML();
|
||||
if(commandes.fichierAnalyseValide) System.out.println("Le chargement du fichier d'analyse est réussi.");
|
||||
|
||||
// tree.setModel(utils.getTree().getModel()) ;
|
||||
// textNodeSelect.setText("Le chargement de la nouvelle structure est réussi.");
|
||||
// create.this.MAJToolBar();
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(e.getSource()==btnCreate) {
|
||||
// Creer = new create();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
if(e.getSource()==actCharge) {
|
||||
if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." );
|
||||
new filechooserXML();
|
||||
if(commandes.fichierAnalyseValide) System.out.println("Le chargement du fichier d'analyse est réussi.");
|
||||
|
||||
// tree.setModel(utils.getTree().getModel()) ;
|
||||
// textNodeSelect.setText("Le chargement de la nouvelle structure est réussi.");
|
||||
// create.this.MAJToolBar();
|
||||
|
||||
if(!commandes.console) System.out.println( "Fin chargement du fichier d'analyse" );
|
||||
new evaluate();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
if(e.getSource()==aPropos) {
|
||||
new about();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!commandes.console) System.out.println( "Fin chargement du fichier d'analyse" );
|
||||
new evaluate();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
if(e.getSource()==aPropos) {
|
||||
new about();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
package app;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public class test {
|
||||
|
||||
private JFrame frame;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
test window = new test();
|
||||
window.frame.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public test() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
frame = new JFrame();
|
||||
frame.setBounds(100, 100, 450, 300);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user