Bonjour !

J'ai un petit souci avec mon interface graphique édité grâce à VE d'eclipse : j'ai un JPanel dans lequel j'ai placé plusieurs composants (JLabel, JTextField, etc ) ça s'affiche bien pas de problème.

Le souci c'est lorsque j'efface par exemple un JLabel, le code s'efface, le JLabel disparait de l'éditeur également mais son texte - JLabel.setText() - reste affiché sur l'interface ! Et lorsque je lance l'application il n'y a aucun message d'erreur et le texte du JLabel effacé s'affiche...

Par contre si j'efface ou met en commentaire la procédure qui lance les fonctions, rien ne s'affiche (normal).

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
private ContactClientPanel getDetailsContactPanel() {
		if (detailsContactPanel == null) {
			mailLabel = new JLabel();
			mailLabel.setLocation(new Point(10, 118));
			mailLabel.setPreferredSize(new Dimension(85, 20));
			mailLabel.setText("Adresse email");
			mailLabel.setSize(new Dimension(131, 20));
			telecopieLabel = new JLabel();
			telecopieLabel.setLocation(new Point(10, 94));
			telecopieLabel.setPreferredSize(new Dimension(85, 20));
			telecopieLabel.setText("Fax");
			telecopieLabel.setSize(new Dimension(66, 20));
			TelephoneLabel = new JLabel();
			TelephoneLabel.setLocation(new Point(10, 70));
			TelephoneLabel.setPreferredSize(new Dimension(85, 20));
			TelephoneLabel.setText("Téléphone");
			TelephoneLabel.setSize(new Dimension(66, 20));
			prenomLabel = new JLabel();
			prenomLabel.setLocation(new Point(10, 46));
			prenomLabel.setPreferredSize(new Dimension(85, 20));
			prenomLabel.setText("Prénom");
			prenomLabel.setSize(new Dimension(65, 20));
			nomLabel = new JLabel();
			nomLabel.setLocation(new Point(10, 22));
			nomLabel.setPreferredSize(new Dimension(85, 20));
			nomLabel.setText("Nom");
			nomLabel.setSize(new Dimension(65, 20));
 
			detailsContactPanel = new ContactClientPanel();
			detailsContactPanel.setLayout(null);
			detailsContactPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Contact", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", Font.PLAIN, 12), new Color(51, 51, 51)));
			detailsContactPanel.setSize(new Dimension(246, 301));
			detailsContactPanel.setLocation(new Point(143, 5));
 
			detailsContactPanel.add(nomLabel, null);
			detailsContactPanel.add(prenomLabel, null);
			detailsContactPanel.add(TelephoneLabel, null);
			detailsContactPanel.add(telecopieLabel, null);
			detailsContactPanel.add(mailLabel, null);
			detailsContactPanel.add(getCommentairesPanel1(), null);
			detailsContactPanel.add(getEmailTextField(), null);
			detailsContactPanel.add(getFaxTextField(), null);
			detailsContactPanel.add(getTelTextField(), null);
			detailsContactPanel.add(getPrenomTextField(), null);
			detailsContactPanel.add(getNomTextField(), null);
		}
		return detailsContactPanel;
	}
J'ai aussi vérifié qu'aucun label ne soit appelé dans les fonctions get à la fin de la fonction. Quelqu'un sait ce qu'il se passe et comment faire pour que tout marche correctement ?
merci de votre aide !