Package java.awt.event

Examples of java.awt.event.KeyAdapter


   
   
    mModel = new ReminderTableModel(reminderList, mTitleSelection = new JComboBox());

    mTable = new JTable();
    mTable.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_ESCAPE || e.getKeyCode() == KeyEvent.VK_ENTER) {
          mTable.getRootPane().dispatchEvent(e);
        }
      }
View Full Code Here


      if (isPassword)
        pan.add(passwordField);
      else
        pan.add(answerField);

      KeyAdapter kl = new KeyAdapter()
      {
        public void keyTyped(KeyEvent e)
        {
          if (e.getKeyChar() == '\n')
            finish();
View Full Code Here

       * the meaning of the TAB key - and I want to use it in bash.
       * Again - this is a simple DEMO terminal =)
       */
      terminalArea.setCaretColor(Color.BLACK);

      KeyAdapter kl = new KeyAdapter()
      {
        public void keyTyped(KeyEvent e)
        {
          int c = e.getKeyChar();

View Full Code Here

                        ex.printStackTrace();
                    }
                }
            });

        mainTable.addKeyListener(new KeyAdapter() {

                public void keyPressed(KeyEvent e) {
                    final int keyCode = e.getKeyCode();
                    final TreePath path = frame.groupSelector.getSelectionPath();
                    final GroupTreeNode node = path == null ? null : (GroupTreeNode) path.getLastPathComponent();
View Full Code Here

    }       */

  private class MyGlassPane extends JPanel {
    //ForegroundLabel infoLabel = new ForegroundLabel("Showing search");
    public MyGlassPane() {
      addKeyListener(new KeyAdapter() { });
      addMouseListener(new MouseAdapter() { });
      /*  infoLabel.setForeground(new Color(255, 100, 100, 124));

        setLayout(new BorderLayout());
        add(infoLabel, BorderLayout.CENTER);*/
 
View Full Code Here

                positionLabel.setText(text);
            }
        });
        mediaPlayer.addMediaListener(swingExec.wrap(MediaListener.class, mediaListener));
        // Propate key events to the video component without giving it focus
        addKeyListener(new KeyAdapter() {

            public void keyPressed(KeyEvent evt) {
                for (KeyListener l : videoComponent.getKeyListeners()) {
                    l.keyPressed(evt);
                }
View Full Code Here

      initDlg();

      initListeners();

      _dlg.txtSeparatorChar.addKeyListener(new KeyAdapter()
      {
         public void keyTyped(KeyEvent e)
         {
            onSeparatorCharChanged(e);
         }
View Full Code Here

                frame.add(videoComponent, BorderLayout.CENTER);
                //
                // Propagate key events.  This could be done with focus, but this
                // test uses the same code as used in VideoPlayer.
                //
                frame.addKeyListener(new KeyAdapter() {

                    public void keyPressed(KeyEvent evt) {
                        for (KeyListener l : videoComponent.getKeyListeners()) {
                            l.keyPressed(evt);
                        }
View Full Code Here

        addJCheckbox("text", eastPanel, false);
        eastPanel.add(searchButton, BorderLayout.EAST);

        queryPanel.add(eastPanel, BorderLayout.EAST);

        textField.addKeyListener(new KeyAdapter()
        {
            @Override
            public void keyReleased(KeyEvent e)
            {
                if (e.getKeyCode() == KeyEvent.VK_ENTER)
View Full Code Here

                if (e.isPopupTrigger()) {
                    showTofTextAreaPopupMenu(e);
                }
            }
        });
        messageTextArea.addKeyListener(new KeyAdapter() {
            @Override
            public void keyTyped(final KeyEvent e) {
                if( e == null ) {
                    return;
                } else if(e.getKeyChar() == KeyEvent.VK_DELETE && parentFrame == mainFrame ) {
View Full Code Here

TOP

Related Classes of java.awt.event.KeyAdapter

Copyright © 2018 www.massapicom. 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.