Bonjour tout le monde
Je voudrais que lorsque l'on sur un menuitem qu'une jframe s'ouvre.
Class de la fenêtre que je veux ouvrir.
Voici les erreur cette class, se trouvant au niveau de super.
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 import java.awt.*; import javax.swing.*; import java.util.*; import java.awt.event.*; import java.awt.Color.*; public class GraphLicence extends JFrame implements ActionListener{ JLabel titre; JTextField text1; JTextField text2; JTextField text3; JTextField text4; JTextField text5; JButton envoi; JComponent zone; public GraphLicence(Frame parent,String title,boolean mode){ super(parent,title,mode); GridBagLayout gridbag = new GridBagLayout(); this.setLayout(gridbag); } protected JComponent SaisieLic(){ JPanel graphlic = new JPanel(); GridBagLayout gridbag = new GridBagLayout(); graphlic.setLayout(gridbag); titre = new JLabel("Entrer le numéro de Licence"); titre.setForeground(Color.blue); Font titrefon = titre.getFont(); titrefon = titrefon.deriveFont(Font.BOLD).deriveFont(16f); titre.setFont(titrefon); GridBagConstraints titr = new GridBagConstraints(); titr.gridx=1; titr.gridy=0; titr.gridwidth=1; titr.gridheight=1; titr.weightx=0; titr.weighty=0; titr.insets = new Insets(2,2,2,2); gridbag.setConstraints(titre, titr); graphlic.add(titre) return graphlic; } public void actionPerformed(ActionEvent evt) { Object source = evt.getSource(); } }
The constructor JFrame(Frame, String, boolean) is undefined
Voici le code du menu.
Voici l'erreur se situant sur la ligne ::GraphLicence Licenc = new GraphLicence(this,"Saisie numéro de licence",true);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 licen = new JMenuItem("Licence",new ImageIcon("icon/clee.gif")); licen.setMnemonic('n'); licen.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ GraphLicence Licenc = new GraphLicence(this,"Saisie numéro de licence",true); Licenc.setBounds(5,5,450,320); Licenc.show(); } });
Pourriez vous m'aider à corriger les erreur svp.
The constructor GraphLicence(new ActionListener(){}, String, boolean) is undefined
Merci
A +







Répondre avec citation
Partager