public class Gui extends JFrame implements ActionListener, ItemListener, MouseListener
{
//Dichiarazione dei JComponent
// campi di testo e etichette
private JTextField text_dal, text_al, text_giorno, text_mese, text_anno,
text_ora, text_luogo, text_oggetto, text_note, text_search, text_replace,
text_total, text_current;
private JLabel vedi, dal, al, label_giorno, label_mese, label_anno, label_ora,
label_luogo, label_oggetto, label_note, label_total, label_current;
private JFileChooser fc = new JFileChooser();
//barra di scorrimento
private JScrollPane barra;
// JEditorPane
protected static JTextArea campo;
//Toolbar
private JToolBar toolbar = new JToolBar();
private JToolBar toolbar_sotto = new JToolBar();
//Bottoni
private JButton button_save = new JButton();
private JButton button_open = new JButton();
private JButton button_new = new JButton();
private JButton button_close = new JButton();
private JButton button_next = new JButton();
private JButton button_previous = new JButton();
private JButton button_sort = new JButton();
private JButton button_search = new JButton("Cerca");
private JButton button_replace = new JButton("Sostituisci");
private JButton button_delete = new JButton();
private JButton button_add = new JButton();
private JButton button_saveas = new JButton();
private JButton vedi1 = new JButton("Vai");
//Combo box
private JComboBox drop_down;
private JComboBox drop_search;
private JComboBox drop_replace;
//MenuBar
protected static JMenuBar jmb = new JMenuBar();
private static JMenu file_menu = new JMenu();
private static JMenu file_action = new JMenu();
private static JMenuItem file_add = new JMenuItem();
private static JMenu help_menu = new JMenu();
private static JMenuItem file_open = new JMenuItem();
private static JMenuItem file_save = new JMenuItem();
private static JMenuItem file_saveas = new JMenuItem();
private static JMenuItem file_close = new JMenuItem();
private static JMenuItem file_exit = new JMenuItem();
private static JMenuItem file_remove = new JMenuItem();
private static JMenuItem help_use = new JMenuItem();
private static JMenuItem help_about = new JMenuItem();
private static JMenu file_visualizza = new JMenu();
private static JMenuItem file_settimana = new JMenuItem();
private static JMenuItem file_mese = new JMenuItem();
private static JMenuItem file_anno = new JMenuItem();
private static JMenuItem file_new = new JMenuItem();
[.....]
public void set_label_text() {
panel_date.setLayout(new GridLayout(2, 4, 15, 15));
panel_date.setBorder(new TitledBorder(""));
panel_date.setBackground(Color.black);
panel_date.add(label_giorno = new JLabel("Giorno"));
label_giorno.setFont(new Font("Arial", 1, 12));
label_giorno.setForeground(Color.orange);
panel_date.add(text_giorno = new JTextField(""));
text_giorno.setEditable(false);
text_giorno.setBackground(Color.black);
text_giorno.setForeground(Color.orange);
text_giorno.setFont(new Font("Times", 1, 12));
panel_date.add(label_mese = new JLabel("Mese"));
label_mese.setFont(new Font("Arial", 1, 12));
label_mese.setForeground(Color.orange);
panel_date.add(text_mese = new JTextField(""));
text_mese.setEditable(false);
text_mese.setBackground(Color.black);
text_mese.setForeground(Color.orange);
text_mese.setFont(new Font("Times", 1, 12));
panel_date.add(label_anno = new JLabel("Anno"));
label_anno.setFont(new Font("Arial", 1, 12));
label_anno.setForeground(Color.orange);
panel_date.add(text_anno = new JTextField(""));
text_anno.setEditable(false);
text_anno.setBackground(Color.black);
text_anno.setForeground(Color.orange);
text_anno.setFont(new Font("Times", 1, 12));
panel_date.add(label_ora = new JLabel("Ore"));
label_ora.setFont(new Font("Arial", 1, 12));
label_ora.setForeground(Color.orange);
panel_date.add(text_ora = new JTextField(""));
text_ora.setEditable(false);
text_ora.setBackground(Color.black);
text_ora.setForeground(Color.orange);
text_ora.setFont(new Font("Times", 1, 12));
panel_campi.setLayout(new GridLayout(3, 4, 10, 10));
panel_campi.setBorder(new TitledBorder(""));
panel_campi.setBackground(Color.black);
panel_campi.add(label_luogo = new JLabel("Luogo"));
label_luogo.setFont(new Font("Arial", 1, 12));
label_luogo.setForeground(Color.orange);
panel_campi.add(text_luogo = new JTextField(""));
text_luogo.setEditable(false);
text_luogo.setBackground(Color.black);
text_luogo.setForeground(Color.orange);
text_luogo.setFont(new Font("Times", 1, 12));
panel_campi.add(vedi = new JLabel("Visualizza appuntamenti"));
vedi.setFont(new Font("Arial", 1, 12));
vedi.setForeground(Color.orange);
panel_campi.add(vedi1);
vedi1.setBackground(Color.darkGray);
vedi1.setForeground(Color.orange);
vedi1.setBorder(new TitledBorder(""));
panel_campi.add(label_oggetto = new JLabel("Oggetto"));
label_oggetto.setFont(new Font("Arial", 1, 12));
label_oggetto.setForeground(Color.orange);
panel_campi.add(text_oggetto = new JTextField(""));
text_oggetto.setEditable(false);
text_oggetto.setBackground(Color.black);
text_oggetto.setForeground(Color.orange);
text_oggetto.setFont(new Font("Times", 1, 12));
panel_campi.add(dal = new JLabel("Dal:"));
dal.setFont(new Font("Arial", 1, 12));
dal.setForeground(Color.orange);
panel_campi.add(text_dal = new JTextField(""));
text_dal.setEditable(false);
text_dal.setBackground(Color.black);
text_dal.setForeground(Color.orange);
text_dal.setFont(new Font("Times", 1, 12));
panel_campi.add(label_note = new JLabel("Note"));
label_note.setFont(new Font("Arial", 1, 12));
label_note.setForeground(Color.orange);
panel_campi.add(text_note = new JTextField(""));
text_note.setEditable(false);
text_note.setBackground(Color.black);
text_note.setForeground(Color.orange);
text_note.setFont(new Font("Times", 1, 12));
panel_campi.add(al = new JLabel("Al:"));
al.setFont(new Font("Arial", 1, 12));
al.setForeground(Color.orange);
panel_campi.add(text_al = new JTextField(""));
text_al.setEditable(false);
text_al.setBackground(Color.black);
text_al.setForeground(Color.orange);
text_al.setFont(new Font("Times", 1, 12));
[....]