Package javax.swing

Examples of javax.swing.JButton.requestFocus()


    // add view button
    JButton viewButton = new JButton("View");
    // viewButton.setToolTipText( "View results of already processed data");
    viewButton.setDefaultCapable(true);
    viewButton.setRequestFocusEnabled(true);
    viewButton.requestFocus();
    viewButton.addFocusListener(tlf);

    // copy into the mediator
    prefsMed.setDocButtons(runButton, interButton, viewButton);
    // Add the run button to another panel
View Full Code Here


    // add view button
    JButton viewButton = new JButton("View");
    // viewButton.setToolTipText( "View results of already processed data");
    viewButton.setDefaultCapable(true);
    viewButton.setRequestFocusEnabled(true);
    viewButton.requestFocus();
    viewButton.addFocusListener(tlf);

    // copy into the mediator
    prefsMed.setDocButtons(runButton, interButton, viewButton);
    // Add the run button to another panel
View Full Code Here

    // add view button
    JButton viewButton = new JButton("View");
    // viewButton.setToolTipText( "View results of already processed data");
    viewButton.setDefaultCapable(true);
    viewButton.setRequestFocusEnabled(true);
    viewButton.requestFocus();
    viewButton.addFocusListener(tlf);

    // copy into the mediator
    prefsMed.setDocButtons(runButton, interButton, viewButton);
    // Add the run button to another panel
View Full Code Here

                  // CraigM: 17/07/2008 - Set the focus only when the window is shown.  Ref: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5018574
                  dialog.addComponentListener(new ComponentAdapter() {
                    @Override
                    public void componentShown(ComponentEvent e) {
                            dialog.getRootPane().setDefaultButton(defaultButton);
                            defaultButton.requestFocus();
                    }
                  });
                }
            }
View Full Code Here

                JRootPane aRootPane = getRootPane();
                if (aRootPane != null) {
                    JButton aDefaultButton = aRootPane.getDefaultButton();
                    if (aDefaultButton!= null && aDefaultButton.isEnabled()) {
                        loseFocus(Constants.FC_KEYNEXT);
                        aDefaultButton.requestFocus();

                        UIutils.invokeOnGuiThread(new Runnable () {
                            public void run() {
                                getRootPane().getDefaultButton().doClick();
                            }
View Full Code Here

                JRootPane aRootPane = getRootPane();
                if (aRootPane != null) {
                    JButton aDefaultButton = aRootPane.getDefaultButton();
                    if (aDefaultButton!= null && aDefaultButton.isEnabled()) {
                        loseFocus(Constants.FC_KEYNEXT);
                        aDefaultButton.requestFocus();

                        UIutils.invokeOnGuiThread(new Runnable () {
                            public void run() {
                                getRootPane().getDefaultButton().doClick();
                            }
View Full Code Here

                  // CraigM: 17/07/2008 - Set the focus only when the window is shown.  Ref: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5018574
                  dialog.addComponentListener(new ComponentAdapter() {
                    @Override
                    public void componentShown(ComponentEvent e) {
                            dialog.getRootPane().setDefaultButton(defaultButton);
                            defaultButton.requestFocus();
                    }
                  });
                }
            }
View Full Code Here

                JRootPane aRootPane = getRootPane();
                if (aRootPane != null) {
                    JButton aDefaultButton = aRootPane.getDefaultButton();
                    if (aDefaultButton!= null && aDefaultButton.isEnabled()) {
                        loseFocus(Constants.FC_KEYNEXT);
                        aDefaultButton.requestFocus();

                        UIutils.invokeOnGuiThread(new Runnable () {
                            public void run() {
                                getRootPane().getDefaultButton().doClick();
                            }
View Full Code Here

                  // CraigM: 17/07/2008 - Set the focus only when the window is shown.  Ref: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5018574
                  dialog.addComponentListener(new ComponentAdapter() {
                    @Override
                    public void componentShown(ComponentEvent e) {
                            dialog.getRootPane().setDefaultButton(defaultButton);
                            defaultButton.requestFocus();
                    }
                  });
                }
            }
View Full Code Here

        butOkey.addActionListener(exit);
        JPanel p = new JPanel();

        WindowListener wl = new WindowAdapter() {
            public void windowOpened(WindowEvent e) {
                butOkey.requestFocus();
            }
        };
        this.addWindowListener(wl);
        p.add(txt, BorderLayout.CENTER);
        p.add(butOkey, BorderLayout.SOUTH);
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.