1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| public class Initialize {
public static JFrame mainFrame = null;
public static JPanel jPanel2;
public static JPanel jPanel4;
public static JTabbedPane jTabbedPane1;
public Initialize() {
mainFrame = new JFrame("Programme");
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setMinimumSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height));
mainFrame.setPreferredSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height));
mainFrame.setVisible(true);
jTabbedPane1 = new javax.swing.JTabbedPane();
jTabbedPane1.setPreferredSize(mainFrame.getSize());
mainFrame.add(jTabbedPane1);
//Librairie - ProgLibrary
jTabbedPane1.addTab("Librairie", getJPanel2());
//Programmation - ProgScenario
jTabbedPane1.addTab("Programmation", getJPanel4());
}
/**
* Page de programmation des librairies
*/
public static JPanel getJPanel2() {
// TODO Auto-generated method stub
int debutDecomp = 50;
jPanel2 = new JPanel();
jPanel2.setLayout(new GroupLayout());
//Affiche la couleur
jPanel2.add(PourScenario.getJlabelColorise(jPanel2), new Constraints(new Leading(500, 10, 10), new Leading(debutDecomp+380, 12, 12)));
return jPanel2;
}
/**
* Page de programmation des scenarios
*/
public static JPanel getJPanel4() {
// TODO Auto-generated method stub
int debutDecomp = 40;
jPanel4 = new JPanel();
jPanel4.setLayout(new GroupLayout());
//Affiche la couleur
jPanel4.add(PourScenario.getJlabelColorise(jPanel4), new Constraints(new Leading(500, 10, 10), new Leading(debutDecomp+380, 12, 12)));
return jPanel4;
}
} |
Partager