Bonsoir à vous tous , je souhaite afficher une fenêtre contenant un bouton et lorsque on clique sur le boutton ça me redirige vers une autre fenêtre le code celui là interprète ce que je veux mais le problème c'est qu'il fonctionne pas
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
 
 
package projet;
 
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.Dimension;
import java.awt.Rectangle;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.JList;
import javax.swing.JToggleButton;
import javax.swing.JProgressBar;
import  javax.swing.*;
import  java.awt.*;
import java.awt.Font;
import java.awt.Color;
import javax.swing.AbstractAction;
import java.awt.event.ActionEvent;
import javax.swing.Action;
import java.beans.PropertyChangeListener;
import java.lang.Object;
import java.lang.String;
import javax.swing.text.TextAction;
import java.awt.ComponentOrientation;
 
 
public class INTER extends JFrame {
 
	private static final long serialVersionUID = 1L;
 
	private JPanel jContentPane = null;
 
 
 
	private JButton entrée = null;
 
	private JToggleButton jToggleButton = null;
 
	private JLabel jLabel = null;
 
	private JButton jButton = null;
 
	public INTER() {
		super();
		initialize();
 
	}
 
 
	private void initialize() {
		this.setSize(1046, 286);
		this.setContentPane(getJContentPane());
		this.setTitle("Accueil Sonelgaz Aplication");
 
	}
 
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(313, 18, 307, 32));
			jLabel.setFont(new Font("Dialog", Font.BOLD | Font.ITALIC, 24));
			jLabel.setBackground(new Color(238, 238, 137));
			jLabel.setForeground(new Color(51, 123, 51));
			jLabel.setText("     Faite votre choix merci");
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.setVisible(true);
			jContentPane.setBackground(new Color(255, 225, 0));
			jContentPane.add(getEntrée(), null);
			jContentPane.add(getJToggleButton(), null);
			jContentPane.add(jLabel, null);
			jContentPane.add(getJButton(), null);
			jContentPane.add(getOwner(), BorderLayout.CENTER);
		}
		return jContentPane;
	}
 
	/**
         * This method initializes entrée      
         *      
         * @return javax.swing.JButton  
         */
	private JButton getEntrée() {
		if (entrée == null) {
			entrée = new JButton();
			entrée.setBounds(new Rectangle(384, 165, 190, 32));
			entrée.setFont(new Font("Andalus", Font.BOLD | Font.ITALIC, 18));
			entrée.setBackground(new Color(217, 150, 135));
			entrée.setForeground(new Color(51, 51, 154));
			entrée.setText("Liste des incidents");
		}
		return entrée;
	}
 
 
	private JToggleButton getJToggleButton() {
		if (jToggleButton == null) {
			jToggleButton = new JToggleButton();
 
			jToggleButton.setBounds(new Rectangle(143, 102, 206, 36));
			jToggleButton.setText("Saisie d'un incident");
			jToggleButton.setFont(new Font("Andalus", Font.BOLD | Font.ITALIC, 18));
			jToggleButton.setBackground(new Color(217, 150, 135));
			jToggleButton.setComponentOrientation(ComponentOrientation.UNKNOWN);
			jToggleButton.setForeground(new Color(51, 51, 154));
			jToggleButton.setVisible(true);
			jToggleButton.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
 
					new Sorti1().setVisible(true); 
					jToggleButton.setVisible(false); 
 
					System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
 
				}
 
			});
			jToggleButton.addMouseListener(new java.awt.event.MouseAdapter() {
				public void mouseClicked(java.awt.event.MouseEvent e) {
					System.out.println("mouseClicked()"); // TODO Auto-generated Event stub mouseClicked()
					new Sorti1().setVisible(true); 
					jToggleButton.setVisible(false); 
}
			});
		}
		return jToggleButton;
	}
 
 
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton();
			jButton.setBounds(new Rectangle(596, 103, 236, 31));
			jButton.setFont(new Font("Andalus", Font.BOLD | Font.ITALIC, 18));
			jButton.setBackground(new Color(217, 150, 135));
			jButton.setForeground(new Color(51, 51, 154));
			jButton.setText("Nombre d'incidents");
		}
		return jButton;
	}
 
}
 
 
 
//*********************************************************************************************************************//
 
 
 
package projet;
 
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JTextField;
import java.awt.Rectangle;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JButton;
 
public class Sorti1 extends JFrame {
 
	private static final long serialVersionUID = 1L;
 
	private JPanel jContentPane = null;
 
	private JComboBox jComboBox = null;
 
	private JLabel jLabel = null;
 
	private JLabel jLabel1 = null;
 
	private JComboBox jComboBox1 = null;
 
	private JComboBox jComboBox2 = null;
 
	private JComboBox jComboBox3 = null;
 
	private JComboBox jComboBox4 = null;
 
	private JLabel jLabel2 = null;
 
	private JLabel jLabel3 = null;
 
	private JLabel jLabel4 = null;
 
	private JButton jButton = null;
 
 
	public Sorti1() {
		super();
		initialize();
	}
 
 
	private void initialize() {
		this.setSize(767, 324);
		this.setContentPane(getJContentPane());
		this.setTitle("Formulaire pou incident");
	}
 
 
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel4 = new JLabel();
			jLabel4.setBounds(new Rectangle(28, 175, 136, 28));
			jLabel4.setText("JLabel");
			jLabel3 = new JLabel();
			jLabel3.setBounds(new Rectangle(26, 136, 137, 28));
			jLabel3.setText("JLabel");
			jLabel2 = new JLabel();
			jLabel2.setBounds(new Rectangle(29, 90, 129, 34));
			jLabel2.setText("JLabel");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new Rectangle(30, 56, 131, 27));
			jLabel1.setText("JLabel");
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(31, 14, 134, 30));
			jLabel.setText("JLabel");
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.add(getJComboBox(), null);
			jContentPane.add(jLabel, null);
			jContentPane.add(jLabel1, null);
			jContentPane.add(getJComboBox1(), null);
			jContentPane.add(getJComboBox2(), null);
			jContentPane.add(getJComboBox3(), null);
			jContentPane.add(getJComboBox4(), null);
			jContentPane.add(jLabel2, null);
			jContentPane.add(jLabel3, null);
			jContentPane.add(jLabel4, null);
			jContentPane.add(getJButton(), null);
 
		}
		return jContentPane;
	}
 
 
	private JComboBox getJComboBox() {
		if (jComboBox == null) {
			jComboBox = new JComboBox();
			jComboBox.setBounds(new Rectangle(187, 15, 187, 30));
		}
		return jComboBox;
	}
 
 
	private JComboBox getJComboBox1() {
		if (jComboBox1 == null) {
			jComboBox1 = new JComboBox();
			jComboBox1.setBounds(new Rectangle(184, 56, 189, 30));
		}
		return jComboBox1;
	}
 
 
	private JComboBox getJComboBox2() {
		if (jComboBox2 == null) {
			jComboBox2 = new JComboBox();
			jComboBox2.setBounds(new Rectangle(184, 92, 188, 31));
		}
		return jComboBox2;
	}
 
 
	private JComboBox getJComboBox3() {
		if (jComboBox3 == null) {
			jComboBox3 = new JComboBox();
			jComboBox3.setBounds(new Rectangle(185, 138, 188, 27));
		}
		return jComboBox3;
	}
 
	private JComboBox getJComboBox4() {
		if (jComboBox4 == null) {
			jComboBox4 = new JComboBox();
			jComboBox4.setBounds(new Rectangle(182, 178, 192, 28));
		}
		return jComboBox4;
	}
 
 
	private JButton getJButton() {
		if (jButton == null) {
			jButton = new JButton();
			jButton.setBounds(new Rectangle(336, 260, 110, 27));
			jButton.setText("Entré");
		}
		return jButton;
	}
 
}



Si vous avez des idées n'hésitez pas à me diriger SVP MErci d'avance