Package javax.swing

Examples of javax.swing.JTextField.addFocusListener()


        while (true) {
            // 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");
View Full Code Here


            // 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

                            }
                            else
                            {
                                jtf = new JTextField ();
                                jtf.setPreferredSize(dimTexto);
                                jtf.addFocusListener(flTextField);
                                jtf.addKeyListener(new LimiteKeyListener(((Integer)hmTemp.get("COLUMN_SIZE")).intValue()));
                                jtf.addKeyListener(commandKeyListener);
                                jp2.add(jtf,BorderLayout.CENTER);
                                hmTemp.put("contenido", jtf);
                            }
View Full Code Here

                        case java.sql.Types.REF:
                        case java.sql.Types.JAVA_OBJECT:
                        case -13: // BFILE
                            jtf = new JTextField ("Not supported");
                            jtf.setPreferredSize(dimTexto);
                            jtf.addFocusListener(flTextField);
                            jtf.addKeyListener(commandKeyListener);
                            jp2.add(jtf,BorderLayout.CENTER);
                            hmTemp.put("contenido", jtf);

                            jl = new JLabel(hmTemp.get("TYPE_NAME") + " (Not supported)");
View Full Code Here

      List tempList = nu.fw.jeti.util.Preferences.getStatusMessages(tel+1);
        for(int i=0;i<tempList.size();i++)
      {
        JTextField tempTextField =new JTextField((String)tempList.get(i));
        tempTextField.addFocusListener(new java.awt.event.FocusAdapter()
        {
          public void focusGained(FocusEvent e)
          {
            selectedTextField =(JTextField)e.getSource();
          }
View Full Code Here

    }

    void btnAdd_actionPerformed(ActionEvent e)
    {
    JTextField tempTextField =new JTextField();
      tempTextField.addFocusListener(new java.awt.event.FocusAdapter()
      {
        public void focusGained(FocusEvent e)
        {
          selectedTextField =(JTextField)e.getSource();
        }
View Full Code Here

        // a subtle bug where if you enter a value in a line, do not
        // hit return, and then click on the X to close the window,
        // the value is restored to the original, and then sometime
        // later, the focus is lost and the entered value becomes
        // the value of the parameter.  I don't know of any workaround.
        entryBox.addFocusListener(new QueryFocusListener(name));
    }

    /** Create a single-line password box with the specified name, label, and
     *  default value.  To control the width of the box, call setTextWidth()
     *  first. A value that is entered in the password box should be
View Full Code Here

        final JTextField textField = (JTextField) editorComponent;
        textField.setEditable(true);
        textField.setOpaque(true);
        // System.out.println("CellSelectionnableTextEditor");

        textField.addFocusListener(new FocusListener() {

            @Override
            public void focusLost(FocusEvent arg0) {
                // TODO Auto-generated method stub
View Full Code Here

        super(new JTextField());
        final JTextField textField = (JTextField) editorComponent;
        textField.setEditable(true);
        textField.setOpaque(true);

        textField.addFocusListener(new FocusListener() {

            @Override
            public void focusLost(FocusEvent arg0) {
            }
View Full Code Here

        if(!listReceiversLst.isEditing()) {
            listReceiversLst.editCellAt(listReceiversLst.getSelectedIndex(), null);

            final JTextField listEditorComp = (JTextField) listReceiversLst.getEditorComponent();
            listEditorComp.addPropertyChangeListener(listPcl);
            listEditorComp.addFocusListener(new FocusListener() {

                public void focusGained(FocusEvent e) {
                    ActionFactory.get(ActionKey.LIST_RECEIVEREDIT).setEnabled(false);
                    listEditorComp.selectAll();
                }
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.