Java - Tiene que contener un Toolbar.

 
Vista:

Tiene que contener un Toolbar.

Publicado por Amado (2 intervenciones) el 09/03/2020 20:21:50
Necesito ayuda con esta asigancion
Tiene que contener un Toolbar.

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
paquete com.javatalleres;
 
import java.awt. *;
import javax.swing. *;
 
clase pública LottoMadness16 extiende JFrame {
 
LottoEvent16 lotto = new LottoEvent16 (esto);
 
// configurar la fila 1
JPanel fila1 = nuevo JPanel ();
Opción de grupo de botones = nuevo grupo de botones ();
JCheckBox quickpick = new JCheckBox ("Selección rápida", falso);
JCheckBox personal = nuevo JCheckBox ("Personal", verdadero);
// configurar la fila 2
JPanel row2 = new JPanel ();
JLabel numbersLabel = new JLabel ("Sus selecciones:", JLabel.RIGHT);
JTextField [] números = nuevo JTextField [5];
JLabel winnersLabel = new JLabel ("Ganadores:", JLabel.RIGHT);
JTextField [] ganadores = nuevo JTextField [5];
// configurar la fila 3
JPanel row3 = new JPanel ();
JButton stop = nuevo JButton ("Stop");
JButton play = nuevo JButton ("Play");
JButton reset = nuevo JButton ("Reset");
// configurar la fila 4
JPanel row4 = new JPanel ();
JLabel got3Label = new JLabel ("3 de 6:", JLabel.RIGHT);
JTextField got3 = new JTextField ("0");
JLabel got4Label = new JLabel ("4 de 6:", JLabel.RIGHT);
JTextField got4 = new JTextField ("0");
JLabel got5Label = new JLabel ("5 de 6:", JLabel.RIGHT);
JTextField got5 = new JTextField ("0");
JLabel drawingsLabel = new JLabel ("Dibujos:", JLabel.RIGHT);
Dibujos JTextField = nuevo JTextField ("0");
JLabel yearsLabel = new JLabel ("Años:", JLabel.RIGHT);
// configurar la fila 5
JPanel row5 = new JPanel ();
JTextField años = nuevo JTextField ("0", 10);
JLabel pauseLabel = new JLabel ("Tasa de pausa:", JLabel.RIGHT);
Pausa JTextField = nuevo JTextField ("100", 10);
 
public LottoMadness16 () {
super ("Lotto Madness");
setSize (550, 320);
setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
Diseño GridLayout = nuevo GridLayout (5, 1, 10, 10);
setLayout (diseño);
 
// Añadir oyentes
quickpick.addItemListener (lotto);
personal.addItemListener (lotto);
stop.addActionListener (lotto);
play.addActionListener (lotto);
reset.addActionListener (lotto);
 
FlowLayout layout1 = new FlowLayout (FlowLayout.CENTER,
10, 10);
option.add (selección rápida);
option.add (personal);
row1.setLayout (layout1);
row1.add (selección rápida);
row1.add (personal);
agregar (fila1);
 
GridLayout layout2 = new GridLayout (2, 7, 10, 10);
row2.setLayout (layout2);
row2.setLayout (layout2);
row2.add (numbersLabel);
para (int i = 0; i <5; i ++) {
números [i] = nuevo JTextField ();
row2.add (números [i]);
}
row2.add (winnersLabel);
para (int i = 0; i <5; i ++) {
ganadores [i] = new JTextField ();
ganadores [i] .setEditable (falso);
row2.add (ganadores [i]);
}
agregar (fila2);
 
FlowLayout layout3 = new FlowLayout (FlowLayout.CENTER,
10, 10);
row3.setLayout (layout3);
stop.setEnabled (falso);
fila3.add (detener);
row3.add (reproducir);
row3.add (restablecer);
agregar (fila3);
 
GridLayout layout4 = new GridLayout (2, 4, 20, 10);
row4.setLayout (layout4);
row4.add (got3Label);
got3.setEditable (falso);
row4.add (got3);
row4.add (got4Label);
got4.setEditable (falso);
row4.add (got4);
row4.add (got5Label);
got5.setEditable (falso);
row4.add (got5);
row4.add (drawingsLabel);
dibujos.setEditable (falso);
row4.add (dibujos);
agregar (fila4);
 
FlowLayout layout5 = new FlowLayout (FlowLayout.CENTER,
10, 10);
row5.add (yearsLabel);
years.setEditable (false);
row5.add (años);
row5.setLayout (layout5);
row5.add (pauseLabel);
row5.add (pausa);
agregar (fila5);
 
setVisible (verdadero);
}
 
public static void main (String [] argumentos) {
LottoMadness16 frame = new LottoMadness16 ();
}
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 129
Ha disminuido 1 puesto en Java (en relación al último mes)
Gráfica de Java

Tiene que contener un Toolbar.

Publicado por Juan Manuel (53 intervenciones) el 09/03/2020 21:21:08
amigo tenes que especificar donde es el error o el mensaje o que es lo que quieres hacer, porque es muy engorroso estar leyendo todo el codigo sin idea de que error es el que quieres solucionar, asi ya tenemos una idea de adonde podria estar el error, no es tirar tu codigo y ya esta!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar