Bonsoir,

je souhaiterais mettre à jour le contenu d'un jText. Celui-ci va cherche, lors de l'initialisation de la fenetre des valeurs dans un fichiers.

Masi je ne sais pas comment mettre à jour sa valeur sans pour autant tout retaper ?

Voial un bout de code:

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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
String cheminOriginal;
private JPanel jContentPane = null;
	private JTextField jTextField = null;
	private JLabel jLabel = null;
	private JLabel jLabel1 = null;
	private JTextField jTextField1 = null;
	private JTextField jTextField2 = null;
	private JLabel jLabel2 = null;
	private JLabel jLabel3 = null;
	private JTextField jTextField3 = null;
	private JLabel jLabel4 = null;
	private JCheckBox jCheckBoxYahoo = null;
	private JCheckBox jCheckBoxIndexe = null;
	private JLabel jLabel5 = null;
	private JLabel jLabel6 = null;
	private JLabel jLabel8 = null;
	private JLabel jLabel9 = null;
	private JTextPane jTextPane = null;
	private JLabel jLabel7 = null;
	private JScrollPane jScrollPane = null;
	private JTable jTable1 = null;
 public AnalyseDetails(fichier) 
	 {
		super();
cheminOriginal = Fichier;
	      initialize();
	   }
 
 private void initialize() {
		      this.setContentPane(getJContentPane());
		      this.setSize(1050, 600);
	   }  
 
 
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel7 = new JLabel();
			jLabel7.setBounds(new Rectangle(27, 105, 166, 14));
			jLabel7.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel7.setText("Analyse: ");
			jLabel9 = new JLabel();
			jLabel9.setBounds(new Rectangle(22, 155, 219, 14));
			jLabel9.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel9.setText("Le texte :");
			jLabel8 = new JLabel();
			jLabel8.setBounds(new Rectangle(595, 45, 136, 14));
			jLabel8.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel8.setText("Top 5 :");
			jLabel6 = new JLabel();
			jLabel6.setBounds(new Rectangle(224, 130, 161, 14));
			jLabel6.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel6.setText("Analyse ");
			jLabel5 = new JLabel();
			jLabel5.setBounds(new Rectangle(225, 106, 161, 14));
			jLabel5.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel5.setText("Analyse");
			jLabel4 = new JLabel();
			jLabel4.setBounds(new Rectangle(327, 75, 215, 14));
			jLabel4.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel4.setText("Nombre ");
			jLabel3 = new JLabel();
			jLabel3.setBounds(new Rectangle(168, 75, 95, 14));
			jLabel3.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel3.setText("Confiance :");
			jLabel2 = new JLabel();
			jLabel2.setBounds(new Rectangle(26, 75, 83, 14));
			jLabel2.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel2.setText("% :");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new Rectangle(253, 8, 209, 20));
			jLabel1.setFont(new Font("DialogInput", Font.BOLD, 18));
			jLabel1.setBackground(Color.red);
			jLabel1.setForeground(Color.white);
			jLabel1.setText("Feuille d'analyse");
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(25, 45, 73, 14));
			jLabel.setFont(new Font("DialogInput", Font.BOLD, 12));
			jLabel.setText("Fichier: ");
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.setBackground(new Color(0, 204, 255));
			jContentPane.add(getJTextField(), null);
			jContentPane.add(jLabel, null);
			jContentPane.add(jLabel1, null);
			jContentPane.add(getJTextField1(), null);
			jContentPane.add(getJTextField2(), null);
			jContentPane.add(jLabel2, null);
			jContentPane.add(jLabel3, null);
			jContentPane.add(getJTextField3(), null);
			jContentPane.add(jLabel4, null);
			jContentPane.add(getJCheckBox(), null);
			jContentPane.add(getJCheckBox1(), null);
			jContentPane.add(jLabel5, null);
			jContentPane.add(jLabel6, null);
			jContentPane.add(jLabel8, null);
			jContentPane.add(jLabel9, null);
			jContentPane.add(jLabel7, null);
			jContentPane.add(getJScrollPane(), null);
			jContentPane.add(getJButton(), null);
			jContentPane.add(getJScrollPane1(), null);
		}
		return jContentPane;
	}
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new Rectangle(105, 45, 477, 14));
			jTextField.setEditable(false);
			jTextField.setForeground(Color.blue);
			jTextField.setBackground(Color.yellow);
			jTextField.setFont(new Font("DialogInput", Font.BOLD, 12));
			jTextField.setText(cheminOriginal);
		}
		return jTextField;
	}
C'est ce dernier jTaxtField que je souhaite mettre à jour n'importe qd dans ma classe.
Comment faire?
Ca doit etre tres facile, mais je ne vois pas
D'avance merci