public void saveDataToFile() {
        try {
            String name = this.StudentNameTF.getText();
            String stdclass = this.StandardCB.getSelectedItem().toString();
            String stdsec = this.SectionCB.getSelectedItem().toString();
            String tuition = this.TuitionFeeTF.getText().equalsIgnoreCase("") ? "0" : this.TuitionFeeTF.getText();
            String stationery = this.StationeryFeeTF.getText().equalsIgnoreCase("") ? "0" : this.StationeryFeeTF.getText();
            String maintenance = this.MaintenanceFeeTF.getText().equalsIgnoreCase("") ? "0" : this.MaintenanceFeeTF.getText();
            String transport = this.TransportFeeTF.getText().equalsIgnoreCase("") ? "0" : this.TransportFeeTF.getText();
            String total = this.TotalFeeTF.getText();

            Date d = new Date();
            SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
            String date = sdf.format(d);

            boolean[] paid = new boolean[4];
            paid[0] = this.TuitionFeeTF.getText().equalsIgnoreCase("") ? false : true;
            paid[1] = this.StationeryFeeTF.getText().equalsIgnoreCase("") ? false : true;
            paid[2] = this.MaintenanceFeeTF.getText().equalsIgnoreCase("") ? false : true;
            paid[3] = this.TransportFeeTF.getText().equalsIgnoreCase("") ? false : true;

            String billno = InvoiceNumberTF.getText();

            StudentFee details = new StudentFee(name, stdclass, stdsec, tuition, stationery, maintenance, transport, total, date, billno, paid);
            Utility.details = details;
            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    Utility.writeInvoiceToFile();
                    JOptionPane.showMessageDialog(null,"Bill saved successfully");
                }

            });
            
            

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }