Package javax.swing

Examples of javax.swing.JButton.addActionListener()


    JPanel buttonsP = new JPanel();
    buttonsP.setLayout(new FlowLayout());
    JButton ok,cancel;
    buttonsP.add(ok = new JButton("OK"));
    buttonsP.add(cancel=new JButton("Cancel"));
    ok.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent evt){
        ((DatabaseSaver)m_dsSaver.getSaverTemplate()).resetStructure()
        ((DatabaseConverter)m_dsSaver.getSaverTemplate()).setUrl(m_dbaseURLText.getText());
        ((DatabaseConverter)m_dsSaver.getSaverTemplate()).setUser(m_userNameText.getText());
        ((DatabaseConverter)m_dsSaver.getSaverTemplate()).setPassword(new String(m_passwordText.getPassword()));
View Full Code Here


    } catch (IOException ex) {
      // ignore
    }
   
    JButton browseBut = new JButton("Browse...");
    browseBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          //final JFrame jf = new JFrame("Choose directory");
          final JDialog jf = new JDialog((JDialog)SaverCustomizer.this.getTopLevelAncestor(),
              "Choose directory", true);
View Full Code Here

    gbConstraints.gridy = 3; gbConstraints.gridx = 1;
    gbLayout.setConstraints(m_relativeFilePath, gbConstraints);
    alignedP.add(m_relativeFilePath);
       
    JButton OKBut = new JButton("OK");
    OKBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {         
          (m_dsSaver.getSaverTemplate()).setFilePrefix(m_prefixText.getText());
          (m_dsSaver.getSaverTemplate()).setDir(m_directoryText.getText());
          m_dsSaver.
View Full Code Here

        m_parentWindow.dispose();
      }
    });

    JButton CancelBut = new JButton("Cancel");
    CancelBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (m_modifyListener != null) {
          m_modifyListener.setModifiedStatus(SaverCustomizer.this, false);
        }
       
View Full Code Here

    public void windowClosing(java.awt.event.WindowEvent w) {
      jd.dispose();
      m_MoreOptions.setEnabled(true);
    }
  });
  oK.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent a) {
      m_MoreOptions.setEnabled(true);
      jd.dispose();
    }
  });
View Full Code Here

    JPanel buttonsP = new JPanel();
    buttonsP.setLayout(new FlowLayout());
    JButton ok,cancel;
    buttonsP.add(ok = new JButton("OK"));
    buttonsP.add(cancel=new JButton("Cancel"));
    ok.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent evt){
        ((DatabaseLoader)m_dsLoader.getLoader()).resetStructure()
        ((DatabaseConverter)m_dsLoader.getLoader()).setUrl(m_dbaseURLText.getText());
        ((DatabaseConverter)m_dsLoader.getLoader()).setUser(m_userNameText.getText());
        ((DatabaseConverter)m_dsLoader.getLoader()).setPassword(new String(m_passwordText.getPassword()));
View Full Code Here

      ef.setText(tmp.toString());
    }
   
    efHolder.add(ef, BorderLayout.CENTER);
    JButton browseBut = new JButton("Browse...");
    browseBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          //final JFrame jf = new JFrame("Choose file");
          final JDialog jf = new JDialog((JDialog)LoaderCustomizer.this.getTopLevelAncestor(),
              "Choose file", true);
View Full Code Here

       
    JPanel butHolder = new JPanel();
    //butHolder.setLayout(new GridLayout(1,2));
    butHolder.setLayout(new FlowLayout());
    JButton OKBut = new JButton("OK");
    OKBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          ((FileSourcedConverter)m_dsLoader.getLoader()).
          setFile(new File(ef.getText()));
          // tell the loader that a new file has been selected so
View Full Code Here

        m_parentWindow.dispose();
      }
    });

    JButton CancelBut = new JButton("Cancel");
    CancelBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {               
        if (m_modifyListener != null) {
          m_modifyListener.setModifiedStatus(LoaderCustomizer.this, false);
        }
       
View Full Code Here

          m_parent.dispose();
        }
      }
    });
   
    cancelBut.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        m_classValuePicker.setClassValueIndex(m_backup);
       
        customizerClosing();
        if (m_parent != null) {
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.