代码:
import java.awt.*;
import javax.swing.*;public class classSalutonFrame extends JFrame{
public classSalutonFrame(){
setTitle("google"); //from名称
//super("QQ"); //from名称
setSize(400,300); //from大小
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//单击按钮时退出程序
setVisible(true);//是否显示
FlowLayout flo=new FlowLayout();
setLayout(flo);
JButton ok=new JButton("确定");
JButton quit=new JButton("退出");
JLable pagelable=new JLable("地址",JLable.RIHGT);
JTextFiele addess=new JTextFiele(20);
add(ok);
add(quit);
//FlowLayout flo=new FlowLayout();
//setLayout(flo);
add(pagelable);
add(addess);
setVisible(true);
}
}错误:classSalutonFrame.java:15: 找不到符号
符号: 类 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:15: 找不到符号
符号: 类 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:15: 找不到符号
符号: 变量 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:16: 找不到符号
符号: 类 JTextFiele
位置: 类 classSalutonFrame
JTextFiele addess=new JTextFiele(20);
^
classSalutonFrame.java:16: 找不到符号
符号: 类 JTextFiele
位置: 类 classSalutonFrame
JTextFiele addess=new JTextFiele(20);
^
import java.awt.*;
import javax.swing.*;public class classSalutonFrame extends JFrame{
public classSalutonFrame(){
setTitle("google"); //from名称
//super("QQ"); //from名称
setSize(400,300); //from大小
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//单击按钮时退出程序
setVisible(true);//是否显示
FlowLayout flo=new FlowLayout();
setLayout(flo);
JButton ok=new JButton("确定");
JButton quit=new JButton("退出");
JLable pagelable=new JLable("地址",JLable.RIHGT);
JTextFiele addess=new JTextFiele(20);
add(ok);
add(quit);
//FlowLayout flo=new FlowLayout();
//setLayout(flo);
add(pagelable);
add(addess);
setVisible(true);
}
}错误:classSalutonFrame.java:15: 找不到符号
符号: 类 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:15: 找不到符号
符号: 类 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:15: 找不到符号
符号: 变量 JLable
位置: 类 classSalutonFrame
JLable pagelable=new JLable("地址",JLable.RIHGT);
^
classSalutonFrame.java:16: 找不到符号
符号: 类 JTextFiele
位置: 类 classSalutonFrame
JTextFiele addess=new JTextFiele(20);
^
classSalutonFrame.java:16: 找不到符号
符号: 类 JTextFiele
位置: 类 classSalutonFrame
JTextFiele addess=new JTextFiele(20);
^
import java.awt.*;
import javax.swing.*; public class classSalutonFrame extends JFrame{
public classSalutonFrame(){
setTitle("google"); //from名称
//super("QQ"); //from名称
setSize(400,300); //from大小
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//单击按钮时退出程序
setVisible(true);//是否显示
FlowLayout flo=new FlowLayout();
setLayout(flo);
JButton ok=new JButton("确定");
JButton quit=new JButton("退出");
JLable pagelable=new JLable("地址",JLable.RIHGT);
JTextFiele addess=new JTextFiele(20);
add(ok);
add(quit);
//FlowLayout flo=new FlowLayout();
//setLayout(flo);
add(pagelable);
add(addess);
setVisible(true);
}
}请看红色改正。自已太大意了。连这个者写错。把JLabel错写成JLable