-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecondaFinestra.java
More file actions
42 lines (28 loc) · 1.06 KB
/
SecondaFinestra.java
File metadata and controls
42 lines (28 loc) · 1.06 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
package GUI;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Color;
import java.awt.Container;
public class SecondaFinestra extends JFrame {
public static final int LARGHEZZA = 300;
public static final int ALTEZZA = 200;
public SecondaFinestra() {
super();
setSize(LARGHEZZA, ALTEZZA);
JLabel etichetta = new JLabel("Ora disponibile a colori!");
add(etichetta);
setTitle("Seconda Finestra");
Container pannelloDelContenuto = getContentPane();
pannelloDelContenuto.setBackground(Color.BLUE);
addWindowListener(new DistruttoreFinestra()); // Ascoltatore anonimo
}
public SecondaFinestra(Color colorePersonalizzato) {
super();
setSize(LARGHEZZA, ALTEZZA);
JLabel etichetta = new JLabel("Ora disponibile a colori!");
add(etichetta);
setTitle("SecondaFinestra");
getContentPane().setBackground(colorePersonalizzato);
addWindowListener(new DistruttoreFinestra());
}
}