Examples of addFocusListener()


Examples of javax.swing.JPanel.addFocusListener()

        }
        SpringUtilities.makeCompactGrid(optionsPanel, optionGroups.length, 1,
                0, 0, 5, 5);
        JPanel resultPanel = new JPanel(new BorderLayout());
        resultPanel.add(optionsPanel, BorderLayout.NORTH);
        resultPanel.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent e) {
                optionsPanel.getComponent(0).requestFocus();
            }
           
        });
View Full Code Here

Examples of javax.swing.JPasswordField.addFocusListener()

            // ask the user for the relevant information to locate the
            // schedule.
            JTextField url = new JTextField(urlStr, 40);
            url.addFocusListener(new FocusHighlighter(url));
            JTextField password = new JPasswordField(passwordStr, 10);
            password.addFocusListener(new FocusHighlighter(password));
            String urlLabel = resources.getString("Import_Schedule.URL_Label");
            String passwordLabel =
                resources.getString("Import_Schedule.Password_Label");
            Object message = new Object[] {
                errorMessage,
View Full Code Here

Examples of javax.swing.JScrollBar.addFocusListener()

      public void mouseReleased(MouseEvent arg0) {
      }
         
        });
        sb.addFocusListener(new FocusListener(){

      public void focusGained(FocusEvent arg0) {
        scrolling = true;
      }
View Full Code Here

Examples of javax.swing.JScrollPane.addFocusListener()

         }
         @Override public Object do_root() { return Browsable.this; }
      };
      tree.setBorder(new EmptyBorder(3,3,3,3));
      final JScrollPane scr = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      scr.addFocusListener(new FocusListener() {
         public void focusGained(FocusEvent e) { tree.requestFocusInWindow(); }
         public void focusLost(FocusEvent e) { }
      });
      final JFrame x = new JFrame("Parse Tree");
      x.setLayout(new BorderLayout());
View Full Code Here

Examples of javax.swing.JSlider.addFocusListener()

     * This allows you to select a single value at a time.
     * @return a {@link javax.swing.JSlider} bound to this dynamic query.
     */
    public JSlider createSlider() {
        JSlider slider = new JSlider(m_model);
        slider.addFocusListener(getSliderAdjuster());
        return slider;
    }
   
    private synchronized static FocusListener getSliderAdjuster() {
        if ( s_sliderAdj == null )
View Full Code Here

Examples of javax.swing.JTextArea.addFocusListener()

                String entry = "";
                for (int i = 0; i < llpts.length; i += 2) {
                    entry = entry + llpts[i] + " " + llpts[i + 1] + "\n";
                }
                ta = PaletteHelper.createTextArea("llpts", entry, pop, 5, 8);
                ta.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLL((JTextArea) e.getSource());
                    }
                });
            } else {
View Full Code Here

Examples of javax.swing.JTextArea.addFocusListener()

                String entry = "";
                for (int i = 0; i < xypts.length; i += 2) {
                    entry = entry + xypts[i] + " " + xypts[i + 1] + "\n";
                }
                ta = PaletteHelper.createTextArea("xypts", entry, pop, 0, 0);
                ta.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setXY((JTextArea) e.getSource());
                    }
                });
            }
View Full Code Here

Examples of javax.swing.JTextField.addFocusListener()

            }
        });
        // Users forget to hit Enter, which is required for an action event,
        // then wonder why the rings they draw don't have the desired value.
        // Adding a focus listener addresses this issue.
        field.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent event) {
                if (!event.isTemporary()) {
                    updateInterval(((JTextField) (event.getSource())).getText());
                }
            }
View Full Code Here

Examples of javax.swing.JTextField.addFocusListener()

                    }
                });
                pal.add(jcb);
                pop.add(pal);
                tf = PaletteHelper.createTextEntry("nsegs", "" + nsegs, pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setSegs((JTextField) e.getSource());
                    }
                });
            }
View Full Code Here

Examples of javax.swing.JTextField.addFocusListener()

                    }
                });
            }
            if (rt != OMGraphic.RENDERTYPE_XY) {
                tf = PaletteHelper.createTextEntry("lat1", "" + llpts[0], pop);
                tf.addFocusListener(new FocusAdapter() {
                    public void focusLost(FocusEvent e) {
                        setLLCoordinate((JTextField) e.getSource(), 0);
                    }
                });
                tf = PaletteHelper.createTextEntry("lon1", "" + llpts[1], pop);
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.