Package javax.swing

Examples of javax.swing.JButton.addActionListener()


        JPanel actionsPanel = new JPanel();
        actionsPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
       
        JButton buttonCancel = ComponentFactory.getButton(DcResources.getText("lblCancel"));
        buttonCancel.setActionCommand("cancel");
        buttonCancel.addActionListener(this);
        actionsPanel.add(buttonCancel);       
       
        /** main */
        getContentPane().setLayout(Layout.getGBL());

View Full Code Here


        this.parent = parent;
        setLayout(new BorderLayout());
       
        JButton btPreviousYr =  ComponentFactory.getIconButton(IconLibrary._icoArrowUp);
        btPreviousYr.setToolTipText(DcResources.getText("lblPreviousYear"));
        btPreviousYr.addActionListener(this);
        btPreviousYr.setActionCommand("prevYear");
       
        JButton btPreviousMt = ComponentFactory.getIconButton(IconLibrary._icoArrowUp);
        btPreviousMt.setToolTipText(DcResources.getText("lblPreviousMonth"));
        btPreviousMt.addActionListener(this);
View Full Code Here

        btPreviousYr.addActionListener(this);
        btPreviousYr.setActionCommand("prevYear");
       
        JButton btPreviousMt = ComponentFactory.getIconButton(IconLibrary._icoArrowUp);
        btPreviousMt.setToolTipText(DcResources.getText("lblPreviousMonth"));
        btPreviousMt.addActionListener(this);
        btPreviousMt.setActionCommand("prevMonth");

        JButton btNextMt = ComponentFactory.getIconButton(IconLibrary._icoArrowDown);
        btNextMt.setToolTipText(DcResources.getText("lblNextMonth"));
        btNextMt.addActionListener(this);
View Full Code Here

        btPreviousMt.addActionListener(this);
        btPreviousMt.setActionCommand("prevMonth");

        JButton btNextMt = ComponentFactory.getIconButton(IconLibrary._icoArrowDown);
        btNextMt.setToolTipText(DcResources.getText("lblNextMonth"));
        btNextMt.addActionListener(this);
        btNextMt.setActionCommand("nextMonth");

        JButton btNextYr = ComponentFactory.getIconButton(IconLibrary._icoArrowDown);
        btNextYr.setToolTipText(DcResources.getText("lblNextYear"));
        btNextYr.addActionListener(this);
View Full Code Here

        btNextMt.addActionListener(this);
        btNextMt.setActionCommand("nextMonth");

        JButton btNextYr = ComponentFactory.getIconButton(IconLibrary._icoArrowDown);
        btNextYr.setToolTipText(DcResources.getText("lblNextYear"));
        btNextYr.addActionListener(this);
        btNextYr.setActionCommand("nextYear");

        Box box = new Box(BoxLayout.X_AXIS);
        box.add(btPreviousMt);
        box.add(Box.createHorizontalStrut(3));
View Full Code Here

        JPanel panelActions = new JPanel();
        JButton btOk = ComponentFactory.getButton(DcResources.getText("lblOK"));
        JButton btCancel = ComponentFactory.getButton(DcResources.getText("lblCancel"));
        btOk.addActionListener(this);
        btOk.setActionCommand("ok");
        btCancel.addActionListener(this);
        btCancel.setActionCommand("ok");
       
        panelActions.add(btCancel);
        panelActions.add(btOk);
       
View Full Code Here

       
        buttonCancel.setActionCommand("cancel");
        buttonApply.setActionCommand("apply");
       
        buttonCancel.addActionListener(this);
        buttonApply.addActionListener(this);
       
        panelAction.add(buttonCancel);
        panelAction.add(buttonApply);
       
        //**********************************************************
 
View Full Code Here

        JButton buttonApply = ComponentFactory.getButton(DcResources.getText("lblApply"));
        JButton buttonClose = ComponentFactory.getButton(DcResources.getText("lblClose"));
       
        buttonApply.addActionListener(this);
        buttonApply.setActionCommand("apply");
        buttonClose.addActionListener(this);
        buttonClose.setActionCommand("close");
       
        panelActions.add(buttonApply)
        panelActions.add(buttonClose);
       
View Full Code Here

        JButton btCancel = ComponentFactory.getButton(DcResources.getText("lblCancel"));
        JButton btOK = ComponentFactory.getButton(DcResources.getText("lblOK"));

        btCancel.addActionListener(this);
        btCancel.setActionCommand("cancel");
        btOK.addActionListener(this);
        btOK.setActionCommand("ok");

        pnlActions.add(btOK);
        pnlActions.add(btCancel);
View Full Code Here

        JButton btLeaveMeAlone = ComponentFactory.getButton(DcResources.getText("lblLeaveMeAlone"), IconLibrary._icoError);
        JButton btDonate = ComponentFactory.getButton(DcResources.getText("lblDonation"), IconLibrary._icoDonate);
       
        btNeedMoreTime.addActionListener(this);
        btLeaveMeAlone.addActionListener(this);
        btDonate.addActionListener(this);
       
        btNeedMoreTime.setActionCommand("needmoretime");
        btLeaveMeAlone.setActionCommand("leavemealone");
        btDonate.setActionCommand("donate");
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.