public AlarmCreater(MainFrame parent){
        this.parent = parent;
        try {
            aal = new Alarm_AccessLink();
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(parent, "An sql error has occured: " + ex.getMessage());
        }
        initComponents();
        txtTime.setValue(System.currentTimeMillis()-3600000);
        Date currentDate = new Date(System.currentTimeMillis()-3600000);
        txtDate.setValue(System.currentTimeMillis()-3600000);
        setSize(300, 100);
        setBackground(MyConstants.COLOR_BLUE);
        setForeground(Color.WHITE);
        setButtonColors();
        btnCancel.addActionListener(new MyActionListener());
        btnAccept.addActionListener(new MyActionListener());
        btnAccept.setEnabled(false);
        txtDestination.addKeyListener(new KeyAdapter() {

            @Override
            public void keyReleased(KeyEvent e) {
                if(!txtDestination.getText().equals("") && !txtType.getText().equals(""))
                    btnAccept.setEnabled(true);
                else
                    btnAccept.setEnabled(false);
            }
            
        });
        txtType.addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent e) {
                if(!txtDestination.getText().equals("") && !txtType.getText().equals(""))
                    btnAccept.setEnabled(true);
                else
                    btnAccept.setEnabled(false);
            }
        });
    }