packageSwing;importjava.awt.Color;importjava.awt.Container;importjava.awt.Frame;importjavax.swing.JButton;importjavax.swing.JFrame;importjavax.swing.JPanel;importjavax.sw...
package Swing;
import java.awt.Color;
import java.awt.Container;
import java.awt.Frame;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
public class loginnnn extends JFrame{
/**
*
*/
private static final long serialVersionUID = 1L;
public static void main(String[] args){
new loginnnn();
}
public loginnnn(){
Container c=new Container();
c.setLayout(null);
JPanel jpanel=new JPanel();
JButton jp=new JButton("aaa");//JPasswordField jp=new JPasswordField();
jp.setBounds(10,10,150,23);
JTextField jt=new JTextField();
jt.setBounds(20, 20, 150, 30);
c.add(jpanel);
jpanel.add(jp);
jpanel.add(jt);
c.setBackground(Color.white);
setSize(500,500);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setVisible(true);
}
}
展开