mainframe.java
字号:
}); jLabel5.setForeground(new java.awt.Color(153, 153, 0)); jLabel5.setText("成绩单"); jLabel6.setBackground(new java.awt.Color(255, 153, 153)); jLabel6.setForeground(new java.awt.Color(153, 153, 255)); jLabel6.setText("语文:"); jt4.setEditable(false); jLabel7.setBackground(new java.awt.Color(153, 153, 153)); jLabel7.setForeground(new java.awt.Color(102, 102, 102)); jLabel7.setText("英语:"); jt5.setEditable(false); jLabel8.setForeground(new java.awt.Color(255, 153, 153)); jLabel8.setText("数学:"); jt6.setEditable(false); jLabel9.setForeground(new java.awt.Color(0, 153, 153)); jLabel9.setText("总分:"); jt7.setEditable(false); jLabel10.setForeground(new java.awt.Color(153, 153, 0)); jLabel10.setText("平均分"); jt8.setEditable(false); jLabel11.setForeground(new java.awt.Color(153, 153, 0)); jLabel11.setText("班级分数统计"); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "语文", "数学", "英语" })); jComboBox1.setSelectedIndex(1); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); jButton1.setBackground(new java.awt.Color(153, 153, 255)); jButton1.setText("90-100分"); jButton2.setBackground(new java.awt.Color(255, 153, 153)); jButton2.setText("80-89分"); jButton3.setBackground(new java.awt.Color(153, 153, 153)); jButton3.setText("70-79分"); jButton4.setBackground(new java.awt.Color(153, 255, 204)); jButton4.setText("60-69分"); jButton5.setBackground(new java.awt.Color(204, 204, 0)); jButton5.setText("〈60分"); count0.setText("(0人)"); count1.setText("(0人)"); count2.setText("(0人)"); count3.setText("(0人)"); count4.setText("(0人)"); jButton6.setBackground(new java.awt.Color(204, 204, 204)); jButton6.setText("饼状图"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jButton7.setBackground(new java.awt.Color(255, 153, 153)); jButton7.setText("方形图"); jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jTextField1.setText("一班"); org.jdesktop.layout.GroupLayout LLayout = new org.jdesktop.layout.GroupLayout(L); L.setLayout(LLayout); LLayout.setHorizontalGroup( LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, LLayout.createSequentialGroup() .addContainerGap() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(68, 68, 68) .add(Time, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel8) .add(jLabel9) .add(jLabel10)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jt6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, jt7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) .add(LLayout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jt8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 122, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel6) .add(jLabel7)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jt5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE) .add(jt4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)))) .add(131, 131, 131)) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(jLabel2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jt1)) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel3) .add(jLabel4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jt2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE) .add(jt3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 129, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE))) .add(LLayout.createSequentialGroup() .add(93, 93, 93) .add(jLabel1)) .add(LLayout.createSequentialGroup() .addContainerGap() .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 211, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(LLayout.createSequentialGroup() .add(51, 51, 51) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(LLayout.createSequentialGroup() .add(jButton3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(count2)) .add(LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(count4) .add(count3))) .add(LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton1, 0, 0, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(count1) .add(count0)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 131, Short.MAX_VALUE)) .add(LLayout.createSequentialGroup() .add(87, 87, 87) .add(jLabel5)) .add(LLayout.createSequentialGroup() .add(21, 21, 21) .add(jButton6) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jButton7)) .add(LLayout.createSequentialGroup() .add(73, 73, 73) .add(jLabel11)) .add(LLayout.createSequentialGroup() .addContainerGap() .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(26, 26, 26) .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); LLayout.setVerticalGroup( LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(LLayout.createSequentialGroup() .add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(Time, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jLabel2) .add(jt1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(jt2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jt3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(2, 2, 2) .add(jLabel5) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(LLayout.createSequentialGroup() .add(jLabel6) .add(29, 29, 29)) .add(org.jdesktop.layout.GroupLayout.LEADING, LLayout.createSequentialGroup() .add(jt4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 8, Short.MAX_VALUE) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel7) .add(jt5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel8) .add(jt6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(LLayout.createSequentialGroup() .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel9) .add(jt7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(26, 26, 26)) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jt8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel10))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(2, 2, 2) .add(jLabel11) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton1) .add(count0)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton2) .add(count1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton3) .add(count2)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton4) .add(count3)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton5) .add(count4)) .add(18, 18, 18) .add(LLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jButton6) .add(jButton7)) .add(21, 21, 21)) ); R.setBorder(javax.swing.BorderFactory.createEtchedBorder()); R.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { RStateChanged(evt); } }); R2.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { R2FocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { R2FocusLost(evt); } }); R2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { R2MouseClicked(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { R2MouseEntered(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { R2MousePressed(evt); } }); R2.addContainerListener(new java.awt.event.ContainerAdapter() { public void componentAdded(java.awt.event.ContainerEvent evt) { R2ComponentAdded(evt); } }); R.addTab("二班", R2); R3.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { R3MouseEntered(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { R3MousePressed(evt); } }); R.addTab("三班", R3); R1.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { R1FocusGained(evt); } }); R1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { R1MouseEntered(evt);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -