Hi I'm using the AwtCalendar function from the CourseSchedule\JPlanner.jar that I watched from this MindFusion youtube video (
https://youtu.be/Pz0CF3DMNec) and I was just wondering how to save any changes made to the calendar. For example the boxes created for users to view on a different Jframe.
And if it's possible, I would also like to know how to repeat/reoccur the set boxes as the days go by, your help is very much appreciated!
I'm no java expert so please bare with any informalities I have made.
Sample of my code so far:
package clinic.appointment.management.system;
import com.mindfusion.common.DateTime;
import com.mindfusion.common.Duration;
import com.mindfusion.scheduling.*;
import com.mindfusion.scheduling.awt.AwtCalendar;
import java.awt.BorderLayout;
import java.awt.Container;
public class StaffTimetableSlots extends javax.swing.JFrame {
private final AwtCalendar calendar;
public StaffTimetableSlots() {
initComponents();
setLocationRelativeTo(null);
calendar = new AwtCalendar();
calendar.beginInit();
calendar.setCurrentView(CalendarView.Timetable);
calendar.setTheme(ThemeType.Light);
calendar.setCustomDraw(CustomDrawElements.TimetableItem);
for(int i = 1; i < 7; i++)
calendar.getTimetableSettings().getDates().add(DateTime.today().addDays(i));
calendar.getTimetableSettings().setItemOffset(30);
calendar.getTimetableSettings().setShowItemSpans(false);
calendar.getTimetableSettings().setSnapInterval(Duration.fromMinutes(1));
calendar.getTimetableSettings().setVisibleColumns(7);
calendar.endInit();
Container container = this.getContentPane();
BorderLayout borderLayout = new BorderLayout();
setTitle("Clinic Appointment Management System Timetable Calendar");
container.setLayout(borderLayout);
container.setSize(1000,800);
container.setVisible(true);
container.add(calendar);
//when the mouse is dragged across a column between a certain time, a box will be created to illustrate a timeslot
calendar.setEnableDragCreate(true);
}