当前位置: 代码迷 >> Eclipse >> 为什么小弟我调用GridLayOut对象报错
  详细解决方案

为什么小弟我调用GridLayOut对象报错

热度:82   发布时间:2016-04-23 12:50:05.0
为什么我调用GridLayOut对象报错
代码如下:
package untitledPackage;
import java.awt.*;
import java.awt.Event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Login extends JFrame{

JPanel jp1,jp2,jp3=null;
JLabel jlb1,jlb2;
JButton jb1,jb2;
JTextField jtf1,jtf2;
JPasswordField jpf;
public Login()
{
GridLayOut mylayout=new GridLayout(1,3);
jp1=new JPanel();
jp2=new JPanel();
jp3=new JPanel();
jlb1=new JLabel("用户名");
jlb2=new JLabel("密 码");
jb1=new JButton("确定");
jb2=new JButton("取消");
jtf1=new JTextField(10);
jpf=new JPasswordField(10);
//this.set


}
public static void main(String[] args)
{
Login log=new Login();
}

}

------解决方案--------------------
仔细看看
GridLayOut mylayout=new GridLayout(1,3);
-》
GridLayout mylayout=new GridLayout(1,3);