-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChoix.java
More file actions
52 lines (47 loc) · 1.22 KB
/
Copy pathChoix.java
File metadata and controls
52 lines (47 loc) · 1.22 KB
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
package Pack4;
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class Choix extends JFrame{
JLabel type,quest;
String question;
JPanel p1,p2;
JTextField t;
JComboBox<String> com;
public Choix() {
type=new JLabel("choisir le type de question");
quest=new JLabel("Saisre votre question");
add(quest);
p1=new JPanel();
p2=new JPanel();
t=new JTextField(40);
p1.add(t);
add(p1);
setLayout(new GridLayout(4, 1));
setSize(450, 300);
setLocation(1000, 100);
getContentPane().setBackground(Color.white);
add(type);
com=new JComboBox<String> ();
com.addItem(".....");
com.addItem("choix multiple");
com.addItem("choix unique");
com.addItem("Combo box");
com.addItem("Espace libre");
p2.add(com);
add(p2);
}
public static void main(String[] args) {
Choix c=new Choix();
c.setVisible(true);
}
}