Scheduler
This application is developed to demonstrate how to use the following topic in Java Language. This is a simple Java SE project based on Swing components and storing
object (Vector) in a file using serialization.
Though this application is used in real-world to store appointments, it does serve the purpose of showing how to handle
certain important things in Java.
- Serialization
- Each appointment is stored as a serializable object (Appointment class). All these objects are placed in a Vector, which is
serialized into appointments.dat file
- How to use Menus and Toolbar
- This application contains a few menus, a toolbar. Toolbar contains buttons with images.
- Calling a dialog box from a Frame
- The main frame - MainFrame - displays menus and toolbar. From these menu items and toolbar buttons, we
invoke dialog boxes for adding, deleting and listing appointments.
- JTable
- is used to display list of appointments
- JList
- displays list of appointments, which can be selected by user and deleted after confirmation.
- Null Layout, BorderLayout
- Both BorderLayout and Null layout are used.
- Deserialization
- Upon the start, the application reads data from appointments.dat and deserializes vector from the file.
- NetBeans IDE 5.5 - NetBeans IDE 5.5 is used to develop this application.
Following the steps given below to load and run this project.
- Download scheduler.zip, which contains project in NetBeans IDE.
- Unzip scheduler.zip - you must get a directory - scheduler
- Start NetBeans IDE and select File->Open Project and select scheduler as the directory and click on Open Project Folder button
- Go to Project window using windows->projects
- Select scheduler project and build it using build project
option in popup menu (right click)..
- Select MainFrame.java in <default package> and select Run File option from popup menu (right click)
- In the beginning you do not have any data. So add some appointments using
Schedule -> Add Schedule
- Save appointments using Disk -> Save Appointments To Disk. This serializes all appointments in Vector to disk - appointments.dat