Tabnine Logo
JPasswordField.getActionMap
Code IndexAdd Tabnine to your IDE (free)

How to use
getActionMap
method
in
javax.swing.JPasswordField

Best Java code snippets using javax.swing.JPasswordField.getActionMap (Showing top 2 results out of 315)

origin: com.eas.platypus/platypus-js-launcher

/**
 * Creates new form LoginDialog
 *
 */
public CredentialsSelector() {
  super((java.awt.Frame) null, true);
  initComponents();
  tfUserName.getActionMap().put(OK_ACTION_ID, okAction);
  tfUserName.getActionMap().put(CANCEL_ACTION_ID, cancelAction);
  tfPassword.getActionMap().put(OK_ACTION_ID, okAction);
  tfPassword.getActionMap().put(CANCEL_ACTION_ID, cancelAction);
  tfUserName.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), OK_ACTION_ID);
  tfUserName.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_ACTION_ID);
  tfPassword.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), OK_ACTION_ID);
  tfPassword.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_ACTION_ID);
  String userName = Preferences.userRoot().node(SETTINGS_NODE).get(LOGIN_SETTING, "");
  if (userName != null && !userName.isEmpty()) {
    tfUserName.setText(userName);
    String password = Preferences.userRoot().node(SETTINGS_NODE).get(PASSWORD_SETTING, "");
    tfPassword.setText(password);
    checkRememberPassword.setSelected(true);
  }
}
origin: stackoverflow.com

pf.getActionMap().put("TransferFocus", action);
ImageIcon ic=new ImageIcon("C:/key.gif");
b1=new JButton("Login",ic);
javax.swingJPasswordFieldgetActionMap

Popular methods of JPasswordField

  • <init>
  • getPassword
  • setText
  • setEnabled
  • addActionListener
  • addKeyListener
  • setColumns
  • getDocument
  • setEchoChar
  • requestFocusInWindow
  • setEditable
  • setPreferredSize
  • setEditable,
  • setPreferredSize,
  • addFocusListener,
  • setFont,
  • setToolTipText,
  • setName,
  • getEchoChar,
  • getText,
  • requestFocus,
  • setDocument

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now