一个简易的登陆窗口
/*============================* @autor jing
* @version 2013-12-23
*--------------------------
* 一个简单的通讯录登陆主窗口
*/
package jing_minibook;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class LoginMainWindow extends JFrame implements ActionListener
{
JFrame Login_JFrame = new JFrame();
JTextField usernameTextField = new JTextField();
JTextField passnameTextField = new JTextField();
JButton register = new JButton();
JButton login = new JButton();
JLabel Login_JLable = new JLabel();
public void init()
{
Login_JLable.setLayout(null);
Login_JLable.setBackground(Color.WHITE);
register.setBounds(50,50,50,50);
login.setBounds(50,85,50,50);
Login_JLable.add(register);
Login_JLable.add(login);
}
public static void main(String[] args)
{
new LoginMainWindow().init();
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}
想做一个简单的登陆窗口,但是几次布局都是有错误,谁教我怎么布局?稍微改一下就好