java中的错误~~~

来源:百度知道 编辑:UC知道 时间:2024/06/20 17:21:44
大侠们帮忙看下 这程序哪错了啊 我是输入的现成程序代码 对java几乎一窍不通 调试出现了很多错误 几乎都是找不到函数
代码比较多 哪位好心人帮运行下看看 谢谢啦

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;

public class StudentDataWindow extends JFrame{
String title[]={"学号","姓名","性别","出生日期","党员否","专业","家庭住址","简历"};
JTextField txtNo=new JTextField(2);
JTextField txtName=new JTextField(10);
JTextField txtBirthData=new JTextField(5);
JTextField txtAddress=new JTextField(10);
JTextArea txtResume =new JTextArea();
ButtonGroup group=new ButtonGroup();
JRadioButton rabSexM=new JRadioButton("男",true);
JRadioButton rabSexF=new JRadioButton("女",false);
JCheckBox chbMember=new JCheckBox("",false);
JComboBox cobSpeciality=new JComboBox();
JButton next=new JButton("下一页");
JButton prev=

很多都没敲对
for(int i=0;i<7;i++)
p[i]=new JPanel(new FLonLayout(FLonLayout.LEFT));
p[i].add(new JLabel(title[i]));
应该是
for (int i = 0; i < 7; i++)
{
p[i] = new JPanel(new FlowLayout(FlowLayout.LEFT));
p[i].add(new JLabel(title[i]));
}

还有
JPanel centerleft=new JPanel();
center.setLayout(new BorderLayout());
应该是
JPanel center = new JPanel();
center.setLayout(new BorderLayout());

还有
isSelected();
应该是某个对象的方法,你再看看你的现成的代码

好陌生啊