Package javax.swing

Examples of javax.swing.JTextField.addActionListener()


              "Could not send '" + command + "':\n" + ex.getMessage(), "Error sending message",
              JOptionPane.ERROR_MESSAGE);
        }
      }
    };
    commandField.addActionListener(sendCommandAction);
    sendButton.addActionListener(sendCommandAction);

    /* History */
    commandField.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
View Full Code Here


    protected JPanel buildControlPanel() {
        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
        pnl.add(new JLabel("Num objects:"));
        final JTextField tf;
        pnl.add(tf = new JTextField(8));
        tf.addActionListener(
                new ActionListener() {
                    public void actionPerformed(ActionEvent arg0) {
                        int n = 0;
                        try {
                            n = Integer.parseInt(tf.getText());
View Full Code Here

    listener.setProxy(new ConfigurationChangeListener.EditorProxy() {
      public Object getValue() {
        return fromString(result.getText());
      }
    });
    result.addActionListener(listener);

    return result;
  }

  /**
 
View Full Code Here

      final JTextField labelText = OurUtil.textfield(vizState.label.get(elt), 10);
      labelText.setMaximumSize(new Dimension(100, 25));
      labelText.addKeyListener(new KeyAdapter() {
         @Override public final void keyReleased(KeyEvent e) { vizState.label.put(elt, labelText.getText()); }
      });
      labelText.addActionListener(new ActionListener() {
         public final void actionPerformed(ActionEvent e) { vizState.label.put(elt, labelText.getText()); }
      });
      labelText.addFocusListener(new FocusAdapter() {
         @Override public void focusLost(FocusEvent e) { vizState.label.put(elt, labelText.getText()); }
      });
View Full Code Here

      final JTextField labelText = OurUtil.textfield(vizState.label.get(rel), 10);
      labelText.setMaximumSize(new Dimension(100, 25));
      labelText.addKeyListener(new KeyAdapter() {
         @Override public void keyReleased(KeyEvent e)     { vizState.label.put(rel, labelText.getText()); }
      });
      labelText.addActionListener(new ActionListener() {
         public final void actionPerformed(ActionEvent e)  { vizState.label.put(rel, labelText.getText()); }
      });
      labelText.addFocusListener(new FocusAdapter() {
         @Override public void focusLost(FocusEvent e)     { vizState.label.put(rel, labelText.getText()); }
      });
View Full Code Here

    final Runnable loadPlayerFileRunnable = new Runnable() {
      public void run() {
        player.load(playerFileTextField.getText());
      }
    };
    playerFileTextField.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        loadPlayerFileRunnable.run();
      }
    });
    playerFilePanel.add(playerFileTextField);
View Full Code Here

    final Runnable loadPlayerFileRunnable = new Runnable() {
      public void run() {
        shellExplorer.load(playerFileTextField.getText());
      }
    };
    playerFileTextField.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        loadPlayerFileRunnable.run();
      }
    });
    shellExplorerFilePanel.add(playerFileTextField);
View Full Code Here

        playlist.clear();
        playlist.addItem(playerFileTextField.getText(), ":start-time=30 :no-audio :no-video-title-show");
        playlist.play();
      }
    };
    playerFileTextField.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        loadPlayerFileRunnable.run();
      }
    });
    playerFilePanel.add(playerFileTextField);
View Full Code Here

    final Runnable loadPlayerFileRunnable = new Runnable() {
      public void run() {
        player.load(playerFileTextField.getText());
      }
    };
    playerFileTextField.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        loadPlayerFileRunnable.run();
      }
    });
    playerFilePanel.add(playerFileTextField);
View Full Code Here

              "Could not send '" + command + "':\n" + ex.getMessage(), "Error sending message",
              JOptionPane.ERROR_MESSAGE);
        }
      }
    };
    commandField.addActionListener(sendCommandAction);
    sendButton.addActionListener(sendCommandAction);

    /* History */
    commandField.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
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.