JAVAユーザー登録画面
994 ワード
import java.awt.*;
import java.awt.event.*;
import java.util.Arrays;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
public class RegistDemo extends JFrame {
private JPanel contentPane;
private JTextField textField;
private JPasswordField passwordField1;
private JPasswordField passwordField2;
public static void main(String[] args) {
RegistDemo frame = new RegistDemo();
frame.setVisible(true);
}
public RegistDemo() {
setTitle(" ");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 350, 250);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(new GridLayout(5, 1, 5, 5));
JPanel panel1 = new JPanel();
contentPane.add(panel1);
JLabel label1 = new JLabel(" ");
panel1.add(label1);
JPanel panel2 = new JPanel();
panel2.setLayout(new FlowLayout(FlowLayout.LEFT));
contentPane.add(panel2);