SCAU大二上Java综合性实验
一、题目要求
实验内容:
1. 已经提供的原始数据:班级成绩单文件
该文件为文本文件,存储某个班的所有学生某门课程的成绩。
例如:2012级计算机科学与技术8班-面向对象程序设计.txt
文件中每行存储一个学生的成绩,包括:学号、姓名和成绩,中间用英文逗号分隔。
说明:学号和姓名是字符串,成绩使用整数。
例如“2012级计算机科学与技术8班-面向对象程序设计.txt”文件中存放该班学生面向对象程序设计的考试成绩。内容为:
201230740801,赵一,68
201230740802,钱二,82
201230740803,孙三,58
201230740804,李四,62
201230740805,冯五,73
……
2. 实验要求:
(1) 程序使用图形用户界面。
(2) 文件操作与数据统计功能
<1> 打开上面给出的文本文件,将其中的成绩数据加载到内存。
<2> 把内存中的成绩数据另存为格式相同的另一个文本文件。
<3> 把内存中的成绩数据另存为一个二进制的对象文件。
<4> 打开已经保存的二进制的对象文件,将其中的成绩数据加载到内存。
<5> 统计分析已经加载到内存的班级的成绩,包括:最高分、最低分、平均分、各成绩等级的人数和百分比。
说明:该部分界面参见图1,黄色注释框标出的是完成本部分功能需要的界面。
(3) 图形统计功
<1> 对加载到内存的成绩单进行“柱形图”分析
<2> 对加载到内存的成绩单进行“饼图”分析
说明:该部分界面参见图2,图1红注释框标出的是完成本部分功能需要的按钮。图形使用Java的Graphics对象绘制,不得使用第三方类库。
(4) 查询排序功能
<1> 在“查询输入框”输入“学号、姓名或成绩”的全部或部分,成绩列表中只显示包括输入数据的成绩项目。
<2> 点击表格的“列标题”,可以自动按该列排序,2次点击可以切换“升序”和“降序”。
说明:图1黑色注释框指出的是查询界面的位置。提示:JTabel的RowSorter。
提交要求:
二、功能实现方法
1.图形用户界面
运用了Swing 的组件类(JFrame,JButton,JLable等等)去完成了这个功能,使用了可视化编程的方法去完成了,然后使用监听器去触发事件。
2.文件操作与数据统计功能
所有选择文件操作的都使用JFileChooser去完成 。
普通文件输入输出使用,Scanner , PrintWriter 实现。
而对象(二进制)文件即使用DataInputStream , DataOutputStream 来实现。
所有读入的数据存储在一个 ArrayList 里面。
3.图形统计功
使用Graphics 类制作圆,矩形,然后通过数据来调节矩形的高度,通过百分比分配圆的弧度来实现 柱状图 和 饼状图的分析功能 。
4.查询排序功能
使用JTable 来展现保存在ArrayList中的所有学生的数据。
利用 JTable 中的自动排序功能,还有滤器分别完成排序和查找功能。
学了4日的JAVA,写了2日的Java...使用可视化编程写的界面,主类代码坎长得一B,可读性甚差~~ 这样了!!
普通文件读写的编码上面还是有一点问题。我就默认了UTF-8算了。
下面是源程序的几个类
Test(主类)
package test;
/**
*
* @hl_mark
*
*/
import java.awt.Graphics;
import java.io.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.RowFilter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;
public class Test extends javax.swing.JFrame {
int maxScore , minScore , tot ; double averageScore;
int cnt[] = new int[5] ; double percent[] = new double[5] ;
ArrayList studentList = new ArrayList();
private Object output; void updateDate(){
maxScore = 0 ; minScore = 100; averageScore = 0 ;
for( int i = 0 ; i < 5 ; ++i ) {
cnt[i] = 0 ;
percent[i] = 0;
}
tot = studentList.size();
for( int i = 0 ; i < tot ; ++i ){
Student tmp = (Student)studentList.get(i);
int score = tmp.get_score();
averageScore += (double)score ;
if( score > maxScore ) maxScore = score ;
if( score < minScore ) minScore = score ;
if( score >= 0 && score < 60 ) cnt[4]++;
else if( score >=60 && score < 70 ) cnt[3]++;
else if( score >=70 && score < 80 ) cnt[2]++;
else if( score >=80 && score < 90 ) cnt[1]++;
else cnt[0]++;
}
averageScore /= tot;
for( int i = 0 ; i < 5 ; ++i ) percent[i] = (double)cnt[i]/tot*100.0;
} public Test() {
initComponents();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() { jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
jCheckBoxMenuItem2 = new javax.swing.JCheckBoxMenuItem();
jPanel2 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jMenuBar2 = new javax.swing.JMenuBar();
jMenu2 = new javax.swing.JMenu();
jMenu3 = new javax.swing.JMenu();
jMenu4 = new javax.swing.JMenu();
jMenuBar3 = new javax.swing.JMenuBar();
jMenu5 = new javax.swing.JMenu();
jMenu6 = new javax.swing.JMenu();
jMenuBar4 = new javax.swing.JMenuBar();
jMenu7 = new javax.swing.JMenu();
jMenu8 = new javax.swing.JMenu();
jMenuBar5 = new javax.swing.JMenuBar();
jMenu9 = new javax.swing.JMenu();
jMenu10 = new javax.swing.JMenu();
jMenuBar6 = new javax.swing.JMenuBar();
jMenu11 = new javax.swing.JMenu();
jMenu12 = new javax.swing.JMenu();
jMenuBar7 = new javax.swing.JMenuBar();
jMenu13 = new javax.swing.JMenu();
jMenu14 = new javax.swing.JMenu();
jSeparator3 = new javax.swing.JSeparator();
jLayeredPane1 = new javax.swing.JLayeredPane();
jtfSearch = new javax.swing.JTextField();
jlbSearch = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jPanel5 = new javax.swing.JPanel();
jlbMaxS = new javax.swing.JLabel();
jlbMinS = new javax.swing.JLabel();
jlbAvgS = new javax.swing.JLabel();
jlbWell = new javax.swing.JLabel();
jlbGood = new javax.swing.JLabel();
jlbMiddle = new javax.swing.JLabel();
jlbPass = new javax.swing.JLabel();
jlbFail = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jTextField7 = new javax.swing.JTextField();
jTextField8 = new javax.swing.JTextField();
jTextField9 = new javax.swing.JTextField();
jTextField10 = new javax.swing.JTextField();
jTextField11 = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jLabel22 = new javax.swing.JLabel();
jLabel23 = new javax.swing.JLabel();
jLabel25 = new javax.swing.JLabel();
jLabel26 = new javax.swing.JLabel();
jLabelM = new javax.swing.JLabel();
jLabelm = new javax.swing.JLabel();
jLabela = new javax.swing.JLabel();
jLabels0 = new javax.swing.JLabel();
jLabels1 = new javax.swing.JLabel();
jLabels3 = new javax.swing.JLabel();
jLabels2 = new javax.swing.JLabel();
jLabels4 = new javax.swing.JLabel();
jLabelp0 = new javax.swing.JLabel();
jLabelp1 = new javax.swing.JLabel();
jLabelp2 = new javax.swing.JLabel();
jLabelp3 = new javax.swing.JLabel();
jLabelp4 = new javax.swing.JLabel();
jSeparator4 = new javax.swing.JSeparator();
jScrollPane2 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jLabelfile = new javax.swing.JLabel();
jlbScore = new javax.swing.JLabel();
jlbAnalysis = new javax.swing.JLabel();
jbSearch = new javax.swing.JButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jmOpean0 = new javax.swing.JMenuItem();
jmSave0 = new javax.swing.JMenuItem();
jSeparator1 = new javax.swing.JPopupMenu.Separator();
jmOpean1 = new javax.swing.JMenuItem();
jmSave1 = new javax.swing.JMenuItem();
jSeparator2 = new javax.swing.JPopupMenu.Separator();
jmClear = new javax.swing.JMenuItem(); jCheckBoxMenuItem1.setSelected(true);
jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1"); jCheckBoxMenuItem2.setSelected(true);
jCheckBoxMenuItem2.setText("jCheckBoxMenuItem2"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 22, Short.MAX_VALUE)
); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
); jMenu2.setText("File");
jMenuBar2.add(jMenu2); jMenu3.setText("Edit");
jMenuBar2.add(jMenu3); jMenu4.setText("jMenu4"); jMenu5.setText("File");
jMenuBar3.add(jMenu5); jMenu6.setText("Edit");
jMenuBar3.add(jMenu6); jMenu7.setText("File");
jMenuBar4.add(jMenu7); jMenu8.setText("Edit");
jMenuBar4.add(jMenu8); jMenu9.setText("File");
jMenuBar5.add(jMenu9); jMenu10.setText("Edit");
jMenuBar5.add(jMenu10); jMenu11.setText("File");
jMenuBar6.add(jMenu11); jMenu12.setText("Edit");
jMenuBar6.add(jMenu12); jMenu13.setText("File");
jMenuBar7.add(jMenu13); jMenu14.setText("Edit");
jMenuBar7.add(jMenu14); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("ScoreAnalysisSystem"); jLayeredPane1.setBackground(new java.awt.Color(204, 204, 255));
jLayeredPane1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jtfSearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jtfSearchActionPerformed(evt);
}
}); jlbSearch.setText(" 输入学号或姓名或成绩可以自动查询,点击表头列头可以排序");
jlbSearch.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jPanel5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jlbMaxS.setText("最高分"); jlbMinS.setText("最低分"); jlbAvgS.setText("平均分"); jlbWell.setText("优秀 ( 90 - 100 )"); jlbGood.setText("良好 ( 80 - 89 )"); jlbMiddle.setText("中等 ( 70 - 79 )"); jlbPass.setText("及格 ( 60 - 69 )"); jlbFail.setText("不及格( 0 - 59 )"); jButton1.setText("显示柱状分析图");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
}); jButton2.setText("显示饼状分析图");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
}); jLabel11.setText("人,占"); jLabel12.setText("人,占"); jLabel13.setText("人,占"); jLabel14.setText("人,占"); jLabel15.setText("人,占"); jTextField7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField7ActionPerformed(evt);
}
}); jTextField8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField8ActionPerformed(evt);
}
}); jTextField9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField9ActionPerformed(evt);
}
}); jTextField10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField10ActionPerformed(evt);
}
}); jTextField11.setToolTipText("");
jTextField11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField11ActionPerformed(evt);
}
}); jLabel16.setText(" %"); jLabel17.setText(" %"); jLabel18.setText(" %"); jLabel19.setText(" %"); jLabel20.setText(" %"); jLabel21.setText(" %"); jLabel22.setText(" %"); jLabel23.setText(" %"); jLabel25.setText(" %"); jLabel26.setText(" %"); jLabelM.setBackground(new java.awt.Color(255, 255, 255));
jLabelM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelm.setBackground(new java.awt.Color(255, 255, 255));
jLabelm.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabela.setBackground(new java.awt.Color(255, 255, 255));
jLabela.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabels0.setBackground(new java.awt.Color(255, 255, 255));
jLabels0.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabels1.setBackground(new java.awt.Color(255, 255, 255));
jLabels1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabels3.setBackground(new java.awt.Color(255, 255, 255));
jLabels3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabels2.setBackground(new java.awt.Color(255, 255, 255));
jLabels2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabels4.setBackground(new java.awt.Color(255, 255, 255));
jLabels4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelp0.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelp1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelp2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelp3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabelp4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jlbMinS, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jlbMaxS, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jlbGood, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jlbPass, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
.addComponent(jlbMiddle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jlbFail)
.addComponent(jlbAvgS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelm, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelM, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabela, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jlbWell, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabels0, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabels1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabels3, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabels4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabels2, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabelp1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)
.addComponent(jLabelp3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabelp4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabelp2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabelp0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(15, 15, 15)))
.addGap(325, 325, 325)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jlbMaxS, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelM, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelm, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jlbMinS, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jlbAvgS, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabela, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(39, 39, 39)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabels0, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jlbWell, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabelp0, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelp1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jlbGood)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabels1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabels2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelp2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jlbMiddle, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(11, 11, 11))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jlbPass, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabelp3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jLabels3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jlbFail, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
.addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(31, 31, 31))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabels4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(32, 32, 32))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jLabelp4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(32, 32, 32)))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null},
{null, null, null},
{null, null, null},
{null, null, null}
},
new String [] {
"学号", "姓名", "成绩"
}
) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class, java.lang.Integer.class
}; public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
});
jScrollPane2.setViewportView(jTable1);
if (jTable1.getColumnModel().getColumnCount() > 0) {
jTable1.getColumnModel().getColumn(0).setHeaderValue("学号");
jTable1.getColumnModel().getColumn(1).setHeaderValue("姓名");
jTable1.getColumnModel().getColumn(2).setHeaderValue("成绩");
} jLabelfile.setText(" ");
jLabelfile.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabelfile, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 397, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 397, Short.MAX_VALUE)))
.addContainerGap())
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabelfile, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(0, 235, Short.MAX_VALUE)
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 236, Short.MAX_VALUE)))
); jlbScore.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jlbScore.setText(" 成绩单"); jlbAnalysis.setFont(new java.awt.Font("宋体", 1, 14)); // NOI18N
jlbAnalysis.setText(" 数据分析"); jbSearch.setText("查找");
jbSearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jbSearchActionPerformed(evt);
}
}); javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1);
jLayeredPane1.setLayout(jLayeredPane1Layout);
jLayeredPane1Layout.setHorizontalGroup(
jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jLayeredPane1Layout.createSequentialGroup()
.addComponent(jtfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jlbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 477, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jLayeredPane1Layout.createSequentialGroup()
.addComponent(jlbScore, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(155, 155, 155)
.addComponent(jlbAnalysis, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jLayeredPane1Layout.setVerticalGroup(
jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jLayeredPane1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jtfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jbSearch)
.addComponent(jlbSearch))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jlbScore, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jlbAnalysis, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jLayeredPane1.setLayer(jtfSearch, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLayeredPane1.setLayer(jlbSearch, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLayeredPane1.setLayer(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLayeredPane1.setLayer(jlbScore, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLayeredPane1.setLayer(jlbAnalysis, javax.swing.JLayeredPane.DEFAULT_LAYER);
jLayeredPane1.setLayer(jbSearch, javax.swing.JLayeredPane.DEFAULT_LAYER); jMenu1.setText("文件"); jmOpean0.setText("打开文本文件成绩");
jmOpean0.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmOpean0ActionPerformed(evt);
}
});
jMenu1.add(jmOpean0); jmSave0.setText("另存为文本文件成绩");
jmSave0.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmSave0ActionPerformed(evt);
}
});
jMenu1.add(jmSave0);
jMenu1.add(jSeparator1); jmOpean1.setText("打开对象文件成绩");
jmOpean1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmOpean1ActionPerformed(evt);
}
});
jMenu1.add(jmOpean1); jmSave1.setText("另存为对象文件成绩");
jmSave1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmSave1ActionPerformed(evt);
}
});
jMenu1.add(jmSave1);
jMenu1.add(jSeparator2); jmClear.setText("清除数据");
jmClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmClearActionPerformed(evt);
}
});
jMenu1.add(jmClear); jMenuBar1.add(jMenu1); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 828, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 1, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
); pack();
}// </editor-fold> private void jmOpean1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
studentList.clear(); // 清空线性表
JFileChooser filechooser = new JFileChooser();
if( filechooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ){
File file = filechooser.getSelectedFile();
try{
DataInputStream input = new DataInputStream
( new FileInputStream(file) );
while(true){
String id = "" ;String name = "" ;int score=0;
String s = input.readUTF();
// System.out.println(s);
if( s.length() == 0 ) continue;
StringBuilder sb = new StringBuilder();
sb.append(s); int cnt = 0 ;
for( int i = 0 ; i < sb.length(); ++i ){
char op = sb.charAt(i);
if( op == ',' ) { cnt++; continue ; }
if( cnt == 0 ) id += op;
else if( cnt == 1 ) name += op;
else {
score = score * 10 + (op-'0');
}
}
studentList.add( new Student(id,name,score) );
}
}
catch( EOFException ex){
System.out.println("All data read");
}
catch (IOException ex) {
ex.printStackTrace();
}
updateDate(); //更新最高最低分,百分比
jLabelM.setText(maxScore+"");
jLabelm.setText(minScore+"");
jLabela.setText(averageScore+"");
jLabels0.setText(cnt[0]+"");
jLabels1.setText(cnt[1]+"");
jLabels2.setText(cnt[2]+"");
jLabels3.setText(cnt[3]+"");
jLabels4.setText(cnt[4]+"");
jLabelp0.setText(String.format("%.2f",percent[0]));
jLabelp1.setText(String.format("%.2f",percent[1]));
jLabelp2.setText(String.format("%.2f",percent[2]));
jLabelp3.setText(String.format("%.2f",percent[3]));
jLabelp4.setText(String.format("%.2f",percent[4]));
jLabelfile.setText(file.getAbsolutePath()+",共"+ tot + "人" ); DefaultTableModel dtm = (DefaultTableModel) jTable1.getModel();
TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(dtm);
this.jTable1.setRowSorter(sorter); while( dtm.getRowCount() != 0 ) { //清空jtable
dtm.removeRow(0);
} for( int i = 0 ; i < studentList.size() ; ++i ) { //studentList写入jTable
Student tmp = (Student)studentList.get(i);
Vector v = new Vector();
v.add(tmp.get_id());v.add(tmp.get_name());v.add(tmp.get_score());
dtm.addRow(v);
}
}
} private void jmClearActionPerformed(java.awt.event.ActionEvent evt) {
DefaultTableModel dtm = (DefaultTableModel) jTable1.getModel();
while( dtm.getRowCount() != 0 ) { //清空jtable
dtm.removeRow(0);
}
jLabelM.setText(null);
jLabelm.setText(null);
jLabela.setText(null);
jLabels0.setText(null);
jLabels1.setText(null);
jLabels2.setText(null);
jLabels3.setText(null);
jLabels4.setText(null);
jLabelp0.setText(null);
jLabelp1.setText(null);
jLabelp2.setText(null);
jLabelp3.setText(null);
jLabelp4.setText(null);
jLabelfile.setText(null);
} private void jtfSearchActionPerformed(java.awt.event.ActionEvent evt) {
String text = jtfSearch.getText();
TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(jTable1.getModel());
this.jTable1.setRowSorter(sorter);
if( text.trim().length() == 0 )
sorter.setRowFilter(null);
else
sorter.setRowFilter(RowFilter.regexFilter(text));
} private void jmOpean0ActionPerformed(java.awt.event.ActionEvent evt) { studentList.clear(); // 清空线性表
JFileChooser filechooser = new JFileChooser();
if( filechooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ){
File file = filechooser.getSelectedFile();
Scanner input = null;
try {
input = new Scanner(file,"UTF-8");
} catch (FileNotFoundException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
}
while( input.hasNext() ) {
String id = "" ;String name = "" ;int score=0;
String s = input.nextLine();
if( s.length() == 0 ) continue;
StringBuilder sb = new StringBuilder();
sb.append(s); int cnt = 0 ;
for( int i = 0 ; i < sb.length(); ++i ){
char op = sb.charAt(i);
if( op == ',' ) { cnt++; continue ; }
if( cnt == 0 ) id += op;
else if( cnt == 1 ) name += op;
else {
score = score * 10 + (op-'0');
}
}
studentList.add( new Student(id,name,score) );
} updateDate(); //更新最高最低分,百分比
jLabelM.setText(maxScore+"");
jLabelm.setText(minScore+"");
jLabela.setText(averageScore+"");
jLabels0.setText(cnt[0]+"");
jLabels1.setText(cnt[1]+"");
jLabels2.setText(cnt[2]+"");
jLabels3.setText(cnt[3]+"");
jLabels4.setText(cnt[4]+"");
jLabelp0.setText(String.format("%.2f",percent[0]));
jLabelp1.setText(String.format("%.2f",percent[1]));
jLabelp2.setText(String.format("%.2f",percent[2]));
jLabelp3.setText(String.format("%.2f",percent[3]));
jLabelp4.setText(String.format("%.2f",percent[4]));
jLabelfile.setText(file.getAbsolutePath()+",共"+ tot + "人" ); // jTextField12 = new JTextField(""+maxcost);
input.close(); DefaultTableModel dtm = (DefaultTableModel) jTable1.getModel();
TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(dtm);
this.jTable1.setRowSorter(sorter); while( dtm.getRowCount() != 0 ) { //清空jtable
dtm.removeRow(0);
} for( int i = 0 ; i < studentList.size() ; ++i ) { //studentList写入jTable
Student tmp = (Student)studentList.get(i);
Vector v = new Vector();
v.add(tmp.get_id()); v.add(tmp.get_name()); v.add(tmp.get_score());
dtm.addRow(v);
}
}
} private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
} private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
} private void jTextField9ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
} private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
} private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
} private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
NewJFrame3 frame = new NewJFrame3(cnt);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(400, 400);
frame.setLocationRelativeTo(null);
} private void jmSave0ActionPerformed(java.awt.event.ActionEvent evt) {
JFileChooser filechooser = new JFileChooser();
if( filechooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ){
File file = filechooser.getSelectedFile();
try {
PrintWriter output = new PrintWriter(file);
for( int i = 0 ; i < studentList.size() ; ++i ) {
Student tmp = (Student)studentList.get(i);
output.println(tmp.get_id()+","+tmp.get_name()+","+tmp.get_score()+"\n");
}
output.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
}
}
} private void jbSearchActionPerformed(java.awt.event.ActionEvent evt) {
String text = jtfSearch.getText();
TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(jTable1.getModel());
this.jTable1.setRowSorter(sorter);
if( text.trim().length() == 0 )
sorter.setRowFilter(null);
else
sorter.setRowFilter(RowFilter.regexFilter(text));
} private void jmSave1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
JFileChooser filechooser = new JFileChooser();
if( filechooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION ){
File file = filechooser.getSelectedFile();
try {
DataOutputStream output = new DataOutputStream
( new FileOutputStream(file));
for( int i = 0 ; i < studentList.size() ; ++i ) {
Student tmp = (Student)studentList.get(i);
output.writeUTF(tmp.get_String());
}
output.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
}
}
} private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
NewJFrame5 frame = new NewJFrame5(percent);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(400, 400);
frame.setLocationRelativeTo(null);
} /**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Test.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
//</editor-fold> /* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Test().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem2;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel21;
private javax.swing.JLabel jLabel22;
private javax.swing.JLabel jLabel23;
private javax.swing.JLabel jLabel25;
private javax.swing.JLabel jLabel26;
private javax.swing.JLabel jLabelM;
private javax.swing.JLabel jLabela;
private javax.swing.JLabel jLabelfile;
private javax.swing.JLabel jLabelm;
private javax.swing.JLabel jLabelp0;
private javax.swing.JLabel jLabelp1;
private javax.swing.JLabel jLabelp2;
private javax.swing.JLabel jLabelp3;
private javax.swing.JLabel jLabelp4;
private javax.swing.JLabel jLabels0;
private javax.swing.JLabel jLabels1;
private javax.swing.JLabel jLabels2;
private javax.swing.JLabel jLabels3;
private javax.swing.JLabel jLabels4;
private javax.swing.JLayeredPane jLayeredPane1;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu10;
private javax.swing.JMenu jMenu11;
private javax.swing.JMenu jMenu12;
private javax.swing.JMenu jMenu13;
private javax.swing.JMenu jMenu14;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu5;
private javax.swing.JMenu jMenu6;
private javax.swing.JMenu jMenu7;
private javax.swing.JMenu jMenu8;
private javax.swing.JMenu jMenu9;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuBar jMenuBar2;
private javax.swing.JMenuBar jMenuBar3;
private javax.swing.JMenuBar jMenuBar4;
private javax.swing.JMenuBar jMenuBar5;
private javax.swing.JMenuBar jMenuBar6;
private javax.swing.JMenuBar jMenuBar7;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel5;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JPopupMenu.Separator jSeparator1;
private javax.swing.JPopupMenu.Separator jSeparator2;
private javax.swing.JSeparator jSeparator3;
private javax.swing.JSeparator jSeparator4;
private javax.swing.JTable jTable1;
private javax.swing.JTextField jTextField10;
private javax.swing.JTextField jTextField11;
private javax.swing.JTextField jTextField7;
private javax.swing.JTextField jTextField8;
private javax.swing.JTextField jTextField9;
private javax.swing.JButton jbSearch;
private javax.swing.JLabel jlbAnalysis;
private javax.swing.JLabel jlbAvgS;
private javax.swing.JLabel jlbFail;
private javax.swing.JLabel jlbGood;
private javax.swing.JLabel jlbMaxS;
private javax.swing.JLabel jlbMiddle;
private javax.swing.JLabel jlbMinS;
private javax.swing.JLabel jlbPass;
private javax.swing.JLabel jlbScore;
private javax.swing.JLabel jlbSearch;
private javax.swing.JLabel jlbWell;
private javax.swing.JMenuItem jmClear;
private javax.swing.JMenuItem jmOpean0;
private javax.swing.JMenuItem jmOpean1;
private javax.swing.JMenuItem jmSave0;
private javax.swing.JMenuItem jmSave1;
private javax.swing.JTextField jtfSearch;
// End of variables declaration }
NewJFrame3(柱状图,传参int[] )
package scoreaynalysissystem;
import javax.swing.*;
import java.awt.*; public class NewJFrame3 extends JFrame{
public NewJFrame3(int[] data){
add(new NewJFrame4(data));
}
public class NewJFrame4 extends JPanel{ private boolean filled = false; private int[] data;
public NewJFrame4() {
} public NewJFrame4(int[] data) {
this.data=data;
}
public NewJFrame4(boolean filled){ this.filled=filled;
}
protected void paintComponent(Graphics g){
super.paintComponent(g); int width = getWidth();
int height = getHeight();
int gap=20,aa=(int)(height*0.8/11),a2=(int)((0.8*width-6*gap)/5); g.drawRect((int)(0.1*width), (int)(0.1*height), (int)(0.8*width), (int)(0.8*height));
g.drawString(String.valueOf(data[0]),(int)(0.1*width+gap)+a2/2-1,(int)(height-0.1*height-aa*data[0])-5);
g.drawString("优秀",(int)(0.1*width+gap)+a2/2-10,(int)(height-0.1*height+12));
g.setColor(Color.black);
g.setColor(Color.green);
g.fillRect((int)(0.1*width+gap), (int)(height-0.1*height-aa*data[0]), a2, aa*data[0]); g.setColor(Color.black);
g.drawString(String.valueOf(data[1]),(int)(0.1*width+2*gap+a2)+a2/2-1,(int)(height-0.1*height-aa*data[1])-5 );
g.drawString("良好",(int)(0.1*width+2*gap+a2)+a2/2-10,(int)(height-0.1*height+12));
g.setColor(Color.black);
g.setColor(Color.blue);
g.fillRect((int)(0.1*width+2*gap+a2), (int)(height-0.1*height-aa*data[1]),a2, aa*data[1]); g.setColor(Color.black);
g.drawString(String.valueOf(data[2]),(int)(0.1*width+3*gap+2*a2)+a2/2-1, (int)(height-0.1*height-aa*data[2])-5);
g.drawString("中等",(int)(0.1*width+3*gap+2*a2)+a2/2-10,(int)(height-0.1*height+12));
g.setColor(Color.black);
g.setColor(Color.orange);
g.fillRect((int)(0.1*width+3*gap+2*a2), (int)(height-0.1*height-aa*data[2]),a2, aa*data[2]); g.setColor(Color.black);
g.drawString(String.valueOf(data[3]),(int)(0.1*width+4*gap+3*a2)+a2/2-1, (int)(height-0.1*height-aa*data[3])-5);
g.drawString("及格",(int)(0.1*width+4*gap+3*a2)+a2/2-10,(int)(height-0.1*height+12));
g.setColor(Color.black);
g.setColor(Color.yellow);
g.fillRect((int)(0.1*width+4*gap+3*a2), (int)(height-0.1*height-aa*data[3]),a2, aa*data[3]); g.setColor(Color.black);
g.drawString(String.valueOf(data[4]),(int)(0.1*width+5*gap+4*a2)+a2/2-1, (int)(height-0.1*height-aa*data[4])-5);
g.drawString("不及格",(int)(0.1*width+5*gap+4*a2)+a2/2-15,(int)(height-0.1*height+12));
g.setColor(Color.black);
g.setColor(Color.red);
g.fillRect((int)(0.1*width+5*gap+4*a2), (int)(height-0.1*height-aa*data[4]),a2, aa*data[4]); } public boolean isFilled() {
return filled;
} public void setFilled(boolean filled) {
this.filled = filled;
repaint();
}
public Dimension getPreferredSize(){
return new Dimension(80,80);
}
} }
NewJFrame5(饼状图,传参 double[] )
package scoreaynalysissystem;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.*;
import javax.swing.*; public class NewJFrame5 extends JFrame{
public NewJFrame5(double[] data){
add(new NewJFrame6(data));
}
public class NewJFrame6 extends JPanel{ private boolean filled = false; private double[] data;
public NewJFrame6() {
} public NewJFrame6(double[] data) {
this.data=data;
}
public NewJFrame6(boolean filled){ this.filled=filled;
}
protected void paintComponent(Graphics g){
super.paintComponent(g); int width = getWidth()/2;
int height = getHeight()/2;
int radius = (int)(Math.min(getWidth(), getHeight())*0.4);
int d=2*radius;
int x = width-radius;
int y = height-radius;
String[] str = {String.format("%5.2f", data[0]),String.format("%5.2f", data[1]),String.format("%5.2f", data[2]),String.format("%5.2f", data[3]),
String.format("%5.2f", data[4])}; int[] a2={(int)(360*data[0]/100),(int)(360*data[1]/100),(int)(360*data[2]/100),(int)(360*data[3]/100),(int)(360*data[4]/100)}; g.setColor(Color.green);
g.fillRect(5, 20, 10, 10);
g.fillArc(x, y,d,d, 0, a2[0]); g.setColor(Color.blue);
g.fillRect(5, 40, 10, 10);
g.fillArc(x, y,d,d, a2[0], a2[1]); g.setColor(Color.orange);
g.fillRect(5, 60, 10, 10);
g.fillArc(x, y,d,d, a2[0]+a2[1], a2[2]); g.setColor(Color.yellow);
g.fillRect(5, 80, 10, 10);
g.fillArc(x, y,d,d, a2[0]+a2[1]+a2[2],a2[3]); g.setColor(Color.red);
g.fillRect(5, 100, 10, 10);
g.fillArc(x, y,d,d,a2[0]+a2[1]+a2[2]+a2[3] ,a2[4]); g.setColor(Color.black);
g.drawString("优秀"+str[0]+"%", 20, 30);
g.drawString("良好"+str[1]+"%", 20, 50);
g.drawString("中等"+str[2]+"%", 20, 70);
g.drawString("良好"+str[3]+"%", 20, 90);
g.drawString("不及格"+str[4]+"%", 20, 110);
}
public boolean isFilled() {
return filled;
}
public void setFilled(boolean filled) {
this.filled = filled;
repaint();
}
public Dimension getPreferredSize(){
return new Dimension(80,80);
}
} }
Student (信息类型类)
package scoreaynalysissystem;
public class Student {
private String id ;
private String name;
private int score ;
Student (){
}
Student ( String id ,String name , int score ) {
this.id = id ; this.name = name ; this.score = score ;
}
public void set_id( String id ){
this.id = id ;
}
public void set_name( String name ){
this.name = name ;
}
public void set_score( int score ){
this.score = score ;
}
public String get_id(){
return this.id;
}
public String get_name(){
return this.name ;
}
public int get_score(){
return this.score;
}
public void show (){
System.out.println( this.id + "," + this.name + "," + this.score );
}
public String get_String (){
return this.id + "," + this.name + "," + this.score ;
}
public boolean eaquals( Student x ){
return ( this.score == x.score );
}
public int Compareable( Student x ){
if( this.score == x.score ) return 0 ;
else if( this.score > x.score ) return 1 ;
else return -1 ;
}
}
SCAU大二上Java综合性实验的更多相关文章
- 与左侧的 圆括号“(”(位于“e:\大二上课程课件、作业和答案\数据结构\chapter4\sqstack\sqstack\mysqstack.h(23)”)匹配之前遇到文件结束
错误原因是“某对圆括号只打了左括号而没有右括号”,debug方法是:直接根据报错提示:“与左侧的 圆括号“(”(位于“e:\大二上课程课件.作业和答案\数据结构\chapter4\sqstack\sq ...
- 大二上学期Javaweb阶段性学习总结
本学期主要学了h5,css3,js,Java,SQL server数据库基本操作等相关知识,学会了简单web系统的制作. 这个学期总的来说学到了很多东西. 前期Java学习因为有了暑期学习及pta上5 ...
- 学生信息管理系统.cpp(大二上)
#include<iostream> #include<fstream> #include<string> #include<iomanip> #i ...
- ACM至大二省赛小结
大一进acm坑的,大一上就学了个c,下才学c++,不过 c 学完后学 c++ 感觉很简单,应该是大一下开学左右才开始刷题的,前面都在水???然后因为acm协会有各种月赛校赛什么的,班主任的提醒较多,所 ...
- 2018-2019-2 20175217 实验二《Java面向对象程序设计》实验报告
一.实验报告封面 课程:Java程序设计 班级:1752班 姓名:吴一凡 学号:20175217 指导教师:娄嘉鹏 实验日期:2019年4月15日 实验时间:--- 实验序号:实验二 实验名称:Jav ...
- 2018-2019-2 20175235 实验二《Java面向对象程序设计》实验报告
实验内容: 1. 初步掌握单元测试和TDD 2. 理解并掌握面向对象三要素:封装.继承.多态 3. 初步掌握UML建模 4. 熟悉S.O.L.I.D原则 5. 了解设计模式 一.单元测试 1伪代码 百 ...
- 2018-2019-2 20175126谢文航 实验二《Java面向对象程序设计》实验报告
一.实验报告封面 课程:Java程序设计 班级:1751 班 姓名:谢文航 学号:20175126 指导教师:娄嘉鹏 实验日期:2019年4月17日 实验时间:--- 实验序号:实验二 实验名称:Ja ...
- 2016-2017-2 20155326实验二《Java面向对象程序设计》实验报告
2016-2017-2 20155326实验二<Java面向对象程序设计>实验报告 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装.继承.多态 初步掌握UML建模 熟悉 ...
- 20172304 实验二 《Java面向对象程序设计》 实验报告
20172304 实验二 <Java面向对象程序设计> 实验报告 课程名称:<程序设计与数据结构> 学生班级:1723班 学生姓名:段志轩 学生学号:20172304 实验时间 ...
随机推荐
- GitHub 风格的 Markdown 语法
GitHub 风格的 Markdown 语法 [译] GitHub 风格的 Markdown 语法 Original: GitHub Flavored Markdown - GitHub Help T ...
- ansiable介绍及安装
ansible介绍: Ansible默认通过 SSH 协议管理机器. ssh协议介绍:https://www.cnblogs.com/yaozhiqiang/p/9944894.html 安装ansi ...
- 2018-8-10-win10-UWP-发邮件
title author date CreateTime categories win10 UWP 发邮件 lindexi 2018-08-10 19:17:19 +0800 2018-2-13 17 ...
- 2018-8-10-win10-uwp-MetroLog-入门
title author date CreateTime categories win10 uwp MetroLog 入门 lindexi 2018-08-10 19:16:53 +0800 2018 ...
- [转载]解决Android studio新建项目慢的问题
原文地址为:https://blog.csdn.net/easion_zms/article/details/73181402 Android Studio 好处很多,但是当从github上或者导入其 ...
- C# 批量修改考勤设备时间
自己工作中用到的小程序,每次远行后批量改一次 如下: 其中的zkemkeeper是中控的相关组件,因是系统组件,须要先注册相关文件后才有效 using System; using System.Col ...
- SpringIntegration---MongDB
1.依赖 <dependency> <groupId>org.springframework.integration</groupId> <artifactI ...
- [原创] Delphi Create(Application) 和 Create(nil) 的区别
Delphi Create(Application) 和 Create(nil) 的区别: 例如: Form1:=TForm1.Create(Application); Form1:=TForm1.C ...
- Redis缓存在django中的配置
django settings中的配置 # 缓存 CACHES = { "default": { "BACKEND": "django_redis. ...
- SCJP读书之知识点:
1:实例变量和局部变量 实例变量:是在类中进行声明的,可以有public,private等修饰符进行修饰. 局部变量:在方法中进行声明,生命周期就是方法开始,到方法结束.但是可以进行对象的引用来调用. ...