Professional Documents
Culture Documents
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package finalyearproject;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import javax.swing.JOptionPane;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import java.sql.Statement;
/**
*
* @author Prof Oyondi
*/
public class FinalYearProject {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
try{
Splash spl = new Splash();
spl.setVisible(true);
for(int i = 0; i <= 100; i++){
//set the sleep time of the loader
Thread.sleep(45);
spl.loadingNum.setText("Loading..."+Integer.toString(i) +"
%");
spl.jProgressBarload.setValue(i);
//open grading panel if loading in the progress bar is over
if(i == 100){
JOptionPane.showMessageDialog(null, "Welcome");
MainApp app = new MainApp();
app.setVisible(true);
spl.setVisible(false);
}else if(i == 45){
spl.guides_add.setText("Please wait while setting things in
order");
Connection conn = null;
try {
String dbName = "studentsdb";
String userName = "root";
String password = "";
String url =
"jdbc:mysql://localhost:3306/mysql?zeroDateTimeBehavior=convertTo
Null";
Connection connection =
DriverManager.getConnection(url,userName, password);
}
}
}
Second class
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package finalyearproject;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
/**
*
* @author Prof Oyondi
*/
public class GradesTable extends javax.swing.JFrame {
/**
* Creates new form GradesTable
*/
public GradesTable() {
initComponents();
show_Student_Details();
}
public Connection createConnection()
{
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/studentsdb";
String user = "root";
String password = "";
conn = DriverManager.getConnection(url,user ,password);
return conn;
}catch(Exception e){
//print error message if not connected
e.printStackTrace();
return null;
}
}
model.addRow(data);
}
}
/**
* This method is called from within the constructor to initialize the
form.
* WARNING: Do NOT modify this code. The content of this method is
always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLO
SE);
students_table.setModel(new
javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Student_ID", "Name", "Homework Score", "Test Score",
"Totals in %", "Grades"
}
));
students_table.addMouseListener(new
java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
students_tableMouseClicked(evt);
}
});
jScrollPane1.setViewportView(students_table);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.LEADING)
.addComponent(jScrollPane1)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(106, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 663,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELA
TED)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 120,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(79, 79, 79))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayou
t.Alignment.LEADING)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jPanel1,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void
students_tableMouseClicked(java.awt.event.MouseEvent evt) {
MainApp app = new MainApp();
app.setVisible(true);
//SEt row values to be editable by the textfields in mainapp jframe
int i = students_table.getSelectedRow();
TableModel model = students_table.getModel();
app.stud_id.setText(model.getValueAt(i, 0).toString());
app.stud_name.setText(model.getValueAt(i, 1).toString());
app.stud_hwScore.setText(model.getValueAt(i, 2).toString());
app.stud_tScore.setText(model.getValueAt(i, 3).toString());
setVisible(false);
}
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(GradesTable.class.getName()).log(jav
a.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(GradesTable.class.getName()).log(jav
a.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(GradesTable.class.getName()).log(jav
a.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(GradesTable.class.getName()).log(jav
a.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
Third class
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package finalyearproject;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
/**
*
* @author Prof Oyondi
*/
public class MainApp extends javax.swing.JFrame {
private int shomeworks;
private int stestmarks;
private String grade;
private String resultID;
/**
* Creates new form MainApp
*/
public MainApp() {
initComponents();
stud_id.setEnabled(false);
}
/**
* This method is called from within the constructor to initialize the
form.
* WARNING: Do NOT modify this code. The content of this method is
always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLO
SE);
setBackground(new java.awt.Color(204, 204, 255));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("STUDENT GRADING SYSTEM");
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(305, 305, 305)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 227,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4))
.addGap(157, 157, 157)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addComponent(stud_tScore,
javax.swing.GroupLayout.PREFERRED_SIZE, 136,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(stud_hwScore,
javax.swing.GroupLayout.PREFERRED_SIZE, 136,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SIZE, 186,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(218, 218, 218)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 119,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(41, 41, 41)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 128,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 227,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 227,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(162, 162, 162)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addComponent(stud_name,
javax.swing.GroupLayout.PREFERRED_SIZE, 136,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(stud_id,
javax.swing.GroupLayout.PREFERRED_SIZE, 136,
javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addGroup(layout.createSequentialGroup()
.addGap(196, 196, 196)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 774,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(465, 465, 465)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 169,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(227, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 52,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(59, 59, 59)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.BASELINE)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(stud_id,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(21, 21, 21)
.addComponent(stud_name,
javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELA
TED)
.addComponent(stud_hwScore,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(stud_tScore,
javax.swing.GroupLayout.PREFERRED_SIZE, 46,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(120, 120, 120)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRE
LATED)
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 46,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignm
ent.BASELINE)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 56,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SIZE, 56,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 45,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(67, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 56,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(132, 132, 132))
);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
}else if(stud_tScore.getText().equals("")){
//check if marks is an integer
JOptionPane.showMessageDialog(null, "Test marks must not
be empty");
}else{
if(ID == resultID){
JOptionPane.showMessageDialog(null, "Sudent ID already
exists");
//System.exit(1);
}
}catch(Exception ex){
ex.printStackTrace();
}
}
//validate test score to be only number
String test = stud_tScore.getText();
try {
stestmarks = Integer.parseInt(test);
}
catch (NumberFormatException e) {
//Not an integer
JOptionPane.showMessageDialog(null, "Test marks must be
an integer value");
}
int total;
total = shomeworks + stestmarks;
total = shomeworks + stestmarks;
if (shomeworks > 30){
//JOptionPane.showMessageDialog(null, "Home work
should not exceed score of 30%!");
JOptionPane.showMessageDialog(null , "Homework score
must not exceed 30%" , "Homework" ,
JOptionPane.INFORMATION_MESSAGE);
}else if(stestmarks > 70){
JOptionPane.showMessageDialog(null, "Test score must
not exceed 70%","testmarks", JOptionPane.INFORMATION_MESSAGE);
//System.exit(0);
}else{
if(total > 89 ){
grade = "A";
}else if(total > 79 && total < 90){
grade = "B";
}else if(total > 69 && total <= 80){
grade = "C";
}else if(total > 59 && total <= 70){
grade = "D";
}else if(total < 60){
grade = "F";
}else if(total > 100 || total < 0){
JOptionPane.showMessageDialog(null, "Total Can not
exceed 100!","total", JOptionPane.INFORMATION_MESSAGE);
}
String query = "INSERT INTO `students`(`username`,
`HomeWork`, `TEST`, `total`, `grade`) VALUES
('"+stud_name.getText()+"','"+stud_hwScore.getText()+"','"+stud_tScor
e.getText()+"','"+total+"','"+grade+"')";
}
}
}else if(stud_tScore.getText().equals("")){
//check if marks is an integer
JOptionPane.showMessageDialog(null, "Test marks must not
be empty");
}else{
//Calculate the total SCORE
//check if value entered is an integer
Connection connect = createConnection();
String homework = stud_hwScore.getText();
String db_ID = "SELECT `id` FROM `students`";
Statement stmt;
ResultSet result;
String ID = stud_id.getText();
try{
stmt = connect.createStatement();
result = stmt.executeQuery(db_ID);
StudentInfo stud;
while(result.next())
{
String resultID = result.getString("id");
}
if(ID == resultID){
JOptionPane.showMessageDialog(null, "Sudent ID already
exists");
//System.exit(1);
}
}catch(Exception ex){
ex.printStackTrace();
}
}
//validate test score to be only number
String test = stud_tScore.getText();
try {
stestmarks = Integer.parseInt(test);
}
catch (NumberFormatException e) {
//Not an integer
JOptionPane.showMessageDialog(null, "Test marks must be
an integer value");
}
int total;
total = shomeworks + stestmarks;
total = shomeworks + stestmarks;
if (shomeworks > 30){
//JOptionPane.showMessageDialog(null, "Home work
should not exceed score of 30%!");
JOptionPane.showMessageDialog(null , "Homework score
must not exceed 30%" , "Homework" ,
JOptionPane.INFORMATION_MESSAGE);
}else if(stestmarks > 70){
JOptionPane.showMessageDialog(null, "Test score must
not exceed 70%","testmarks", JOptionPane.INFORMATION_MESSAGE);
//System.exit(0);
}else{
if(total > 89 ){
grade = "A";
}else if(total > 79 && total < 90){
grade = "B";
}else if(total > 69 && total <= 80){
grade = "C";
}else if(total > 59 && total <= 70){
grade = "D";
}else if(total < 60){
grade = "F";
}else if(total > 100 || total < 0){
JOptionPane.showMessageDialog(null, "Total Can not
exceed 100!","total", JOptionPane.INFORMATION_MESSAGE);
}
String query = "UPDATE `students` SET
`username`='"+stud_name.getText()+"',`HomeWork`='"+stud_hwScore.
getText()+"',`TEST`='"+stud_tScore.getText()+"',`total`='"+total+"',`Grad
e`='"+grade+"' WHERE `id` = "+stud_id.getText();
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/studentsdb";
String user = "root";
String password = "";
conn = DriverManager.getConnection(url,user ,password);
return conn;
}catch(Exception e){
//print error message if not connected
e.printStackTrace();
return 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(MainApp.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MainApp.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MainApp.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(MainApp.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
Fourth class
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package finalyearproject;
/**
*
* @author Prof Oyondi
*/
public class Splash extends javax.swing.JFrame {
/**
* Creates new form Splash
*/
public Splash() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the
form.
* WARNING: Do NOT modify this code. The content of this method is
always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLO
SE);
setUndecorated(true);
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel5.setText(" STUDENT GRADING SYSTEM");
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel6.setText("WELLCOME TO CS DEPARTMENT");
loadingNum.setHorizontalAlignment(javax.swing.SwingConstants.CENT
ER);
loadingNum.setText("99%");
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(39, 39, 39)
.addComponent(jLabel6,
javax.swing.GroupLayout.PREFERRED_SIZE, 57,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(43, 43, 43)
.addComponent(loadingNum,
javax.swing.GroupLayout.PREFERRED_SIZE, 50,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addComponent(jProgressBarload,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELA
TED)
.addComponent(guides_add,
javax.swing.GroupLayout.PREFERRED_SIZE, 49,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(20, Short.MAX_VALUE))
);
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
/**
* @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(Splash.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Splash.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Splash.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Splash.class.getName()).log(java.util.l
ogging.Level.SEVERE, null, ex);
}
//</editor-fold>
Five th class
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package finalyearproject;
/**
*
* @author Prof Oyondi
*/
public class StudentInfo {
private int id;
private String name;
private int hwScore;
private int tScore;