What is JPasswordField - Java Swing

Java examples for Swing:JPasswordField

Introduction

A JPasswordField is a JTextField hiding the actual characters being displayed in the field.

Create a password field 10 characters wide

import javax.swing.JPasswordField;

public class Main {

  public static void main(String[] args) {
    JPasswordField passwordField = new JPasswordField(10);
  }
}

Related Tutorials