资源简介
数据结构课程设计时写的关于文件索引的程序,由于版本有些乱了,上传的这个可能有些问题,敬请谅解
代码片段和文件信息
package GUI;
//import databaseOperationClass.*;
import Index.*;
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import java.util.Date;
public class OperationGUI extends Jframe //implements ActionListener
{
public final int WIDTH=800;
public final int HEIGHT=600;
//图书信息输入
private JTextField studentID;
private JTextField name;
//private JTextField birth;
private JComboBox year;
private JComboBox month;
private JComboBox day;
private JTextField address;
private JTextField college;
//private JTextField grade;
//private JTextField cla;
private JComboBox grade;
private JComboBox cla;
private JTextArea course;
//数据统计
private JTextField studentQuantity;
private JTextField maxQuantity;
//模糊查找
private JTextField former;
private JTextField later;
private JTextArea showdata;
//main方法
public static void main(String[]args)
{
OperationGUI manager=new OperationGUI();
manager.setVisible(true);
}
//构造方法
public OperationGUI()
{
JTabbedPane operatePane=new JTabbedPane(JTabbedPane.LEFT);
//文件索引操作界面
JPanel studentOperation=new JPanel();
studentOperation.setLayout(new BorderLayout());
JPanel messageInput=new JPanel();
messageInput.setLayout(new BoxLayout(messageInputBoxLayout.Y_AXIS));
JPanel studentIDPanel=new JPanel();
JLabel studentIDLabel=new JLabel(“学号 “);
studentIDPanel.add(studentIDLabel);
studentID=new JTextField(15);
studentIDPanel.add(studentID);
JLabel sidlimit=new JLabel(“最多输入15位 “);
studentIDPanel.add(sidlimit);
messageInput.add(studentIDPanel);
JPanel namePanel=new JPanel();
JLabel nameLabel=new JLabel(“姓名 “);
namePanel.add(nameLabel);
name=new JTextField(4);
namePanel.add(name);
JLabel nameLimit=new JLabel(“姓名最多四个字 “);
namePanel.add(nameLimit);
messageInput.add(namePanel);
JPanel birthPanel=new JPanel();
JLabel birthLabel=new JLabel(“出生日期 “);
birthPanel.add(birthLabel);
Date date=new Date();
String temp=date.toString();
System.out.println(temp);
int nowyear=Integer.parseInt(temp.substring(24));
int[] yearchoice=new int[30];
yearchoice[0]=nowyear-8;
for(int i=1;i<30;i++)
yearchoice[i]=yearchoice[i-1]-1;
String[] years=new String[30];
for(int i=0;i years[i]=Integer.toString(yearchoice[i]);
year=new JComboBox(years);
birthPanel.add(year);
String[] months=new String[12];
for(int i=0;i<
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 226 2008-02-27 21:17 IndexFile\.classpath
文件 385 2008-02-27 21:17 IndexFile\.project
文件 19020 2008-03-07 09:28 IndexFile\GUI\OperationGUI.java
文件 302 2008-03-06 21:16 IndexFile\GUI\WindowDestroyer.java
文件 516 2008-03-06 16:11 IndexFile\Index\BitMap.class
文件 309 2008-03-04 18:06 IndexFile\Index\BitMap.java
文件 1411 2008-03-13 15:59 IndexFile\Index\BTree$BTNode.class
文件 30124 2008-03-13 15:59 IndexFile\Index\BTree.class
文件 54408 2008-03-13 15:59 IndexFile\Index\BTree.java
文件 356 2008-03-06 16:11 IndexFile\Index\KeyhasexistException.class
文件 159 2008-03-05 19:40 IndexFile\Index\KeyhasexistException.java
文件 332 2008-03-06 16:11 IndexFile\Index\NokeyException.class
文件 137 2008-03-05 19:39 IndexFile\Index\NokeyException.java
文件 7024 2008-03-06 16:11 IndexFile\Index\SavitchIn.class
文件 23409 2008-02-28 21:21 IndexFile\Index\SavitchIn.java
目录 0 2009-05-20 20:56 IndexFile\GUI
目录 0 2009-04-01 12:01 IndexFile\Index
目录 0 2009-04-01 12:01 IndexFile
----------- --------- ---------- ----- ----
138118 18
评论
共有 条评论