private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
        // TODO add your handling code here:
        Student = txtStudent.getText();
        BookName = txtBookName.getText();
        BookCategory = txtCategory.getText();
        
        Rent r = new Rent();
        r.setStudent(Student);
        r.setBookName(BookName);
        r.setBookCategory(BookCategory);
        
        File outFile;
        FileOutputStream fStream;
        ObjectOutputStream oStream;
        
        try{
            outFile = new File("rentedbooks.data");
            fStream = new FileOutputStream(outFile);
            oStream = new ObjectOutputStream(fStream);
            
            oStream.writeObject(aList);
            
            JOptionPane.showMessageDialog(null, "Your session was saved successfully");
            
            oStream.close();
            
            
        }
        catch(IOException e){
            System.out.println(e);
        }
    }//GEN-LAST:event_btnSaveActionPerformed