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

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JTextField (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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