Package javax.swing

Examples of javax.swing.JComponent.requestFocus()


//        mainPage.setFocusTraversalPolicy(customPolicy);
        tabbedPane.addFocusListener(new FocusAdapter() {
            boolean isFirstTime = true;
            public void focusGained(FocusEvent e) {
                if (isFirstTime) {
                    mainPage.requestFocus();
                    isFirstTime = false;
                }
                super.focusGained(e);
            }
           
View Full Code Here


                frame.add(screen, BorderLayout.CENTER);
                frame.pack();
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        frame.setVisible(true);
                        screen.requestFocus();
                    }
                });

                return null;
            }
View Full Code Here

      public void ancestorAdded(AncestorEvent event) {
        final JComponent component = event.getComponent();
        EventQueue.invokeLater(new Runnable() {
          public void run() {
            component.requestFocus();          }
        });
        component.removeAncestorListener(this);
      }
    });
    }
View Full Code Here

            private static final long serialVersionUID = 1L;
        };
       
        add("Center", textHost);

        textHost.requestFocus();
    }

    /**
     * Add the given TextPanelListener to the listeners which will
     * receive update notifications from this JTextPanel.
View Full Code Here

        if (fieldEditor != null) {
            getTableTopPanel().add(fieldEditor);

            // display editor
            fieldEditor.setLocation(getEditorPositionForTriangularGem(recordFieldSelectionGem, fieldEditor));
            fieldEditor.requestFocus();
           
           
        }
        return fieldEditor;
    }
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.