Package javax.swing

Examples of javax.swing.JButton.addActionListener()


    panelDeleted.add(new JScrollPane(list), BorderLayout.CENTER);

    JPanel btnPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    ok.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent e) {
        setVisible(false);
      }
View Full Code Here


    mConfigBackgroundStyleBt.setEnabled(style.hasContent());
  }

  public static JButton createBrowseButton(final Component parent, final JTextField tf) {
    JButton bt = new JButton(mLocalizer.msg("change", "Change"));
    bt.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        File file = new File(tf.getText());
        JFileChooser fileChooser = new JFileChooser(file.getParent());
        String[] extArr = { ".jpg", ".jpeg", ".gif", ".png" };
        fileChooser.setFileFilter(new util.ui.ExtensionFileFilter(extArr, ".jpg, .gif, png"));
View Full Code Here

    /**
       Button panel
     **/
    JButton okButton = new JButton();
    okButton.setText("OK");
    okButton.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    updateAndHide();
  }
      });
    buttonPanel.add(okButton);
View Full Code Here

      });
    buttonPanel.add(okButton);

    JButton closeButton = new JButton();
    closeButton.setText("Cancel");
    closeButton.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
    exitForm();
  }
      });
    buttonPanel.add(closeButton);
View Full Code Here

    //
    // buttons
    //
    JButton buttAdd = new JButton();
    buttAdd.setText("Add");
    buttAdd.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        addURL();
      }
    });
    rightPanel.add(buttAdd,1);
View Full Code Here

    });
    rightPanel.add(buttAdd,1);

    JButton buttDelete = new JButton();
    buttDelete.setText("Delete");
    buttDelete.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        deleteURL();
      }
    });
    rightPanel.add(buttDelete,1);
View Full Code Here

    });
    rightPanel.add(buttDelete,1);

    JButton buttClose = new JButton();
    buttClose.setText("Close");
    buttClose.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
        exitForm();
      }
    });
    rightPanel.add(buttClose,1);
View Full Code Here

    JButton setButton = new JButton("Choose");

    // anonymous action listener shows a JTree popup and allows the user
    // to choose the class they want
    setButton.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent e) {

    JPopupMenu popup = getChooseClassPopupMenu();

    // show the popup where the source component is
View Full Code Here

    updateCapabilitiesFilter(m_FilterEditor.getCapabilitiesFilter());
  }
      }
    });
    final JButton visAllBut = new JButton("Visualize All");
    visAllBut.addActionListener(new ActionListener() {
  public void actionPerformed(ActionEvent ae) {
    if (m_Instances != null) {
      try {
        final weka.gui.beans.AttributeSummarizer as =
    new weka.gui.beans.AttributeSummarizer();
View Full Code Here

                  new Dimension(
                        300,
                        (int) generatorPanel.getPreferredSize().getHeight()));
              generateButton.setMnemonic('G');
              generateButton.setToolTipText("Generates the dataset according the settings.");
              generateButton.addActionListener(new ActionListener(){
                  public void actionPerformed(ActionEvent evt){
                    // generate
                    generatorPanel.execute();
                    boolean generated = (generatorPanel.getInstances() != null);
                    if (generated)
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.