Package javax.swing

Examples of javax.swing.JButton.requestFocus()


   
    pack();
   
    setLocation( screenBounds.x + (screenBounds.width - getWidth() ) / 2, screenBounds.y + (screenBounds.height - getHeight()) / 2 );
   
    okButton.requestFocus();
  }

  /* Helper methods */
 
  /**
 
View Full Code Here


                ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {
                    removeWin(currentData,winname);
                    sync.stopWaiting();
                }});
               
                ok.requestFocus();
                sync.stopWaiting();
                drawWin(currentData,winname);
            } catch (Exception e) {
                throw new HBCI_Exception(HBCIUtilsInternal.getLocMsg("EXCMSG_CALLB_ERR"),e);
            }
View Full Code Here

        .addComponent(okBtn)
      )
    );
    setContentPane(panel);
    getRootPane().setDefaultButton(cancelBtn);
    cancelBtn.requestFocus();

    pack();
    setVisible(true);
  }
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

        Object[] wizardButtons = wizardDescriptor.getOptions();
        for (int i = 0; i < wizardButtons.length; i++) {
            JButton tempButton = (JButton) wizardButtons[i];
            if (tempButton.getText().equals(buttonText)) {
                tempButton.setDefaultCapable(true);
                tempButton.requestFocus();
            }
        }
    }
   
    /**
 
View Full Code Here

        }

        if (TwsListener.getLoginFrame() != null) {
            JButton button2 =
                    Utils.findButton(TwsListener.getLoginFrame(), "Login");
            button2.requestFocus();
            KeyEvent ke =
                     new KeyEvent(button2, KeyEvent.KEY_PRESSED,
                                  System.currentTimeMillis(),
                                  KeyEvent.ALT_DOWN_MASK,
                                  KeyEvent.VK_F4,
View Full Code Here

     
      this.setResizable(false);
      this.setVisible(true);
     
      this.getRootPane().setDefaultButton(btn2);
      btn2.requestFocus();
     
      // if the dialog is not in focus, force to exit
      while (true) {
        try {
          Thread.sleep(500L);
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.