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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
| private void jbInit() throws Exception {
h = 600 - 58;
w = 750;
contentPane = (JPanel)this.getContentPane();
this.setResizable(true);
this.setState(java.awt.Frame.NORMAL);
this.setTitle("Convertisseur G3D");
setUpMenuBar();
setupInfoXml();
setupFile();
setupConsole();
this.addWindowListener(new gui_this_windowAdapter(this));
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.setSize(w, h + 58);
contentPane.setLayout(borderLayout1);
contentPane.setPreferredSize(new Dimension(400, 500));
........
contentPane.add(jToolBar1, java.awt.BorderLayout.NORTH);
jToolBar1.add(jToggleButton1);
jToolBar1.add(jToggleButtonOvrirP);
jSplitPaneMain.setOrientation(JSplitPane.VERTICAL_SPLIT);
jSplitPaneMain.setSize(new Dimension(400, 125));
jSplitPaneMain.setDividerLocation(400);
jSplitPaneMainTOP.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
jSplitPaneMainTOP.setDividerLocation(100);
contentPane.add(jSplitPaneMain, java.awt.BorderLayout.CENTER);
jSplitPaneMain.add(jSplitPaneMainTOP, JSplitPane.TOP);
InfoPane = new JPanel();
InfoPane.setBorder(BorderFactory.createLoweredBevelBorder());
InfoPane.setPreferredSize(new Dimension(600, 600));
InfoPane.setSize(new Dimension(600, 600));
InfoPane.setLayout(springlayout1);
// Ca c est mon panel à gauche ou je veux afficher mes infos
InfoPane.setVisible(true);
JScrollPanelInfoXml.setVisible(true);
JScrollPanelInfoXml.add(InfoPane);
jSplitPaneMainTOP.add(JScrollPanelInfoXml,JSplitPane.LEFT);
// ca c est mes infos que je veux afficher dans mon panel de gauche mais qui n'apparaissent pas
JLabelNomFichier = new
JLabel("Fichier:+util.getFichierCourant().getName());
JLabelAuteur = new JLabel("Auteur : "+util.getProjet().getVersion().getAuteur());
SpringLayout.Constraints labelCons =
springlayout1.getConstraints(JLabelNomFichier);
labelCons.setX(Spring.constant(5));
labelCons.setY(Spring.constant(30));
labelCons = springlayout1.getConstraints(JLabelAuteur);
labelCons.setX(Spring.constant(30));
labelCons.setY(Spring.constant(30));
InfoPane.add(JLabelNomFichier);
InfoPane.add(JLabelAuteur);
InfoPane.setVisible(true);
} |