国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javajpasswordfieldJava Swing - 如何創(chuàng)建JPasswordField并設(shè)置初始大小

Java Swing - 如何創(chuàng)建JPasswordField并設(shè)置初始大小

我們想知道如何創(chuàng)建JPasswordField并設(shè)置初始大小。
import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JPasswordField;
public class Main extends JFrame {
  public Main() {

    getContentPane().setLayout(new FlowLayout());

    JPasswordField textField1 = new JPasswordField("m", 1);
    JPasswordField textField2 = new JPasswordField("mm", 2);

    getContentPane().add(textField1);
    getContentPane().add(textField2);

    setSize(300, 190);
    setVisible(true);
  }

  public static void main(String argv[]) {
    new Main();
  }
}