Package javax.swing

Examples of javax.swing.JButton.addActionListener()


        c.weightx = 1;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.insets = new Insets(5, 5, 5, 5);
        resultPanel.add(resultValueField, c);
        JButton addResultButton = new JButton("Add");
        addResultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                addResult();
            }
        });
        c = new GridBagConstraints();
View Full Code Here


        c.weightx = 1;
        c.fill = GridBagConstraints.HORIZONTAL;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(actorTextField, c);
        JButton updateButton = new JButton("Update");
        updateButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                update();
            }
        });
        c = new GridBagConstraints();
View Full Code Here

       
    mClientPluginTargets = ReminderPlugin.getInstance().getClientPluginsTargets();
   
    handlePluginSelection();
   
    choose.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {try{
        Window parent = UiUtilities.getLastModalChildOf(MainFrame
              .getInstance());
        PluginChooserDlg chooser = null;
        chooser = new PluginChooserDlg(parent, mClientPluginTargets, null,
View Full Code Here

    JButton config = new JButton(TVBrowserIcons.preferences(TVBrowserIcons.SIZE_SMALL));

    config.setToolTipText(mLocalizer.msg("config", "Configure Reminder"));
   
    config.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        MainFrame.getInstance().showSettingsDialog(SettingsItem.REMINDER);
      }
    });
View Full Code Here

    builder.addFixed(mUndo);
    builder.addRelatedGap();

    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_CLOSE));

    ok.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (mTable.isEditing()) {
          mTable.getCellEditor().stopCellEditing();
        }
        dispose();
View Full Code Here

    JPanel btnPn=new JPanel(new FlowLayout(FlowLayout.TRAILING));
    btnPn.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));

    JButton okBtn=new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    okBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        mOkPressed=true;
        if (mRememberSettingsCb.isSelected()) {
          settings.setProperty("defaultReminderEntry", Integer.toString(mList
              .getSelectedIndex()));
View Full Code Here

    });
    btnPn.add(okBtn);
    getRootPane().setDefaultButton(okBtn);

    JButton cancelBtn=new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));
    cancelBtn.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        setVisible(false);
      }
    });
    btnPn.add(cancelBtn);
View Full Code Here

    protected Collection<Component> getAdditionalActions() {
        ArrayList<Component> components = new ArrayList<Component>();
        if (isParent()) {
            try {
                JButton btAddChild = ComponentFactory.getButton(DcResources.getText("lblAddChild", getModule().getChild().getObjectName()));
                btAddChild.addActionListener(Plugins.getInstance().get("AddChild", null, null, getIndex(), getModule().getIndex()));
                btAddChild.setMnemonic('T');
                components.add(btAddChild);
            } catch (InvalidPluginException ipe) {
                logger.error(ipe, ipe);
            }
View Full Code Here

    @Override
    public Collection<Component> getAdditionalActions() {
        Collection<Component> components = new ArrayList<Component>();
       
        JButton buttonAddChild = ComponentFactory.getButton(DcResources.getText("lblAddChild", getModule().getObjectName()));
        buttonAddChild.addActionListener(this);
        buttonAddChild.setActionCommand("addChild");
        buttonAddChild.setMnemonic('T');
        components.add(buttonAddChild);
       
        return components;
View Full Code Here

    final JPanel container = new JPanel(new BorderLayout());
    container.add(scrollPane, BorderLayout.CENTER);

    button.setMaximumSize(new Dimension(LFConstants.MAX_WIDTH, LFConstants.DEFAULT_HEIGHT));
    button.setAlignmentX(1.0f);
    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        for (int i=0; i<panels.size(); i++) {
          JComponent c = (JComponent) panels.get(i);
          if (!c.isVisible())
            continue;
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.