-
Notifications
You must be signed in to change notification settings - Fork 0
/
PanelHeader.java
48 lines (33 loc) · 1.06 KB
/
PanelHeader.java
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
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Color;
import javax.swing.*;
public class PanelHeader extends JPanel
{
private Controleur ctrl;
private JLabel lblAccount;
private JLabel lblLink;
public PanelHeader( Controleur ctrl )
{
this.ctrl = ctrl;
this.setLayout ( new FlowLayout() );
/*----------------------------*/
/* Création des composants */
/*----------------------------*/
this.lblAccount = new JLabel("Gestionnaire de mot de passe");
this.lblAccount.setFont( new Font ("Arial", Font.PLAIN, 20));
this.lblAccount.setForeground(Color.WHITE);
this.lblLink = new JLabel("©Tobloxia", JLabel.RIGHT);
/*--------------------------------*/
/* positionnement des composants */
/*--------------------------------*/
this.add( this.lblAccount );
this.add( this.lblLink );
// Colors
this.setBackground( new Color(186, 30, 30));
}
public void setName(String name)
{
this.lblAccount.setText(name);
}
}