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

How to use
setPreferredSize
method
in
javax.swing.JPasswordField

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

origin: org.nhind/agent

public PasswordField(String labelText)
{
  super();
  this.setLayout(new BorderLayout());
  
  label = new JLabel(labelText);
  label.setPreferredSize(new Dimension(150, label.getPreferredSize().getSize().height));
  
  pass = new JPasswordField();
  pass.setPreferredSize(new Dimension(150, label.getPreferredSize().getSize().height));
  
  add(label, BorderLayout.NORTH);
  
  JPanel passPanel = new JPanel(new BorderLayout());
  passPanel.add(pass, BorderLayout.NORTH);            
  
  add(passPanel);
}

origin: stackoverflow.com

 private JTextField username;
private JPasswordField password;
private JPanel [] login = {new JPanel(), new JPanel()};
private JLabel usernamelabel;
private JLabel passwordlabel;

public LoginPanel(){

  setSize(200,200);
  setBackground(new Color(85,153,187));
  setBorder(BorderFactory.createEmptyBorder(70, 70, 70, 70));
  username = new JTextField();
  password = new JPasswordField();
  usernamelabel= new JLabel("Username");
  passwordlabel= new JLabel("Password");
  login[0].add(usernamelabel);
  login[0].add(username);
  login[1].add(passwordlabel);
  login[1].add(password);
  for(JPanel p : login){
    p.setBackground(new Color(85,153,187));
    this.add(p);
  }
  username.setBounds(5, 5, 100, 100);
  username.setPreferredSize(new Dimension(120,20));
  password.setPreferredSize(new Dimension(120,20));

}
origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv

passwordField.setPreferredSize(new java.awt.Dimension(70, 20));
jLabel2.setLabelFor(passwordField);
origin: org.apache.geronimo.daytrader/daytrader-wsappclient

/**
 * This method initializes jTextField1
 *
 * @return JTextField
 */
private JTextField getJTextField1() {
  if (jPasswordField1 == null) {
    jPasswordField1 = new JPasswordField();
    jPasswordField1.setSize(94, 19);
    jPasswordField1.setLocation(181, 29);
    jPasswordField1.setFont(new java.awt.Font("sansserif", 0, 10));
    jPasswordField1.setPreferredSize(new java.awt.Dimension(4, 15));
    jPasswordField1.setText("xxx");
  }
  return jPasswordField1;
}
/**
origin: org.apache.geronimo.samples.daytrader.modules/wsappclient

/**
 * This method initializes jTextField1
 *
 * @return JTextField
 */
private JTextField getJTextField1() {
  if (jPasswordField1 == null) {
    jPasswordField1 = new JPasswordField();
    jPasswordField1.setSize(94, 19);
    jPasswordField1.setLocation(181, 29);
    jPasswordField1.setFont(new java.awt.Font("sansserif", 0, 10));
    jPasswordField1.setPreferredSize(new java.awt.Dimension(4, 15));
    jPasswordField1.setText("xxx");
  }
  return jPasswordField1;
}
/**
origin: org.apache.geronimo.daytrader.modules/wsappclient

/**
 * This method initializes jTextField1
 *
 * @return JTextField
 */
private JTextField getJTextField1() {
  if (jPasswordField1 == null) {
    jPasswordField1 = new JPasswordField();
    jPasswordField1.setSize(94, 19);
    jPasswordField1.setLocation(181, 29);
    jPasswordField1.setFont(new java.awt.Font("sansserif", 0, 10));
    jPasswordField1.setPreferredSize(new java.awt.Dimension(4, 15));
    jPasswordField1.setText("xxx");
  }
  return jPasswordField1;
}
/**
origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81

passwordField.setPreferredSize(new java.awt.Dimension(70, 20));
jLabel2.setLabelFor(passwordField);
origin: fcrepo3/fcrepo

m_protocolComboBox.setPreferredSize(newSize);
m_usernameComboBox.setPreferredSize(newSize);
m_passwordField.setPreferredSize(newSize);
origin: rememberber/WeSync

textFieldDatabaseName.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
textFieldDatabaseUser.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
passwordFieldDatabasePassword.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
origin: rememberber/WeSync

textFieldDatabaseName.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
textFieldDatabaseUser.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
passwordFieldDatabasePassword.setPreferredSize(ConstantsUI.TEXT_FIELD_SIZE_ITEM);
origin: com.synaptix/SynaptixSwing

private void initComponents() {
  glassPane = new JWaitGlassPane(JWaitGlassPane.TYPE_DIRECTION_PING_PONG, "", null, null); //$NON-NLS-1$
  loginComboBoxModel = new LoginComboBoxModel();
  loginBox = new JComboBox(loginComboBoxModel);
  loginBox.setEditable(true);
  loginField = (JTextField) loginBox.getEditor().getEditorComponent();
  loginField.addActionListener(connectionAction);
  loginField.getDocument().addDocumentListener(new LoginDocumentListener());
  passwordField = new JPasswordField();
  passwordField.addActionListener(connectionAction);
  loginField.setPreferredSize(passwordField.getPreferredSize());
  passwordField.setPreferredSize(loginBox.getPreferredSize());
  saveLoginBox = new JCheckBox(ProfilMessages.getString("LoginDialog.5")); //$NON-NLS-1$
  saveLoginBox.addChangeListener(new SaveLoginBoxChangeListener());
  savePasswordBox = new JCheckBox(ProfilMessages.getString("LoginDialog.6")); //$NON-NLS-1$
  savePasswordBox.setEnabled(false);
  iconKeyLabel = new JLabel(ICON_KEY);
  deleteButton = new JButton(deleteAction);
  deleteButton.setBorderPainted(false);
  deleteButton.setFocusable(false);
}
origin: SSilence/scotty

passwordTextField.setPreferredSize(new java.awt.Dimension(200, 22));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
origin: org.netbeans.modules/org-netbeans-modules-j2ee-sun-appsrv81

adminPassword.setMaximumSize(null);
adminPassword.setMinimumSize(null);
adminPassword.setPreferredSize(null);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
origin: SimpleAmazonGlacierUploader/SAGU

credentialsPanel.add(secretField);
secretField.addMouseListener(rmb);
secretField.setPreferredSize(buttonDimension);
secretField.setText(appProperties.getSecretKey());
secretField.addFocusListener(propertiesFocusListener);
origin: FellowTraveler/otapij

jPasswordField1.setMinimumSize(new java.awt.Dimension(100, 10));
jPasswordField1.setName(""); // NOI18N
jPasswordField1.setPreferredSize(new java.awt.Dimension(150, 20));
jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
jPasswordField2.setMinimumSize(new java.awt.Dimension(100, 10));
jPasswordField2.setName(""); // NOI18N
jPasswordField2.setPreferredSize(new java.awt.Dimension(150, 20));
jPasswordField2.addActionListener(new java.awt.event.ActionListener() {
  public void actionPerformed(java.awt.event.ActionEvent evt) {
origin: ontop/ontop

txtDatabasePassword.setPreferredSize(new java.awt.Dimension(180, 24));
txtDatabasePassword.addKeyListener(new java.awt.event.KeyAdapter() {
  public void keyReleased(java.awt.event.KeyEvent evt) {
javax.swingJPasswordFieldsetPreferredSize

Popular methods of JPasswordField

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Collectors (java.util.stream)
  • ImageIO (javax.imageio)
  • JTextField (javax.swing)
  • Top Vim plugins
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