An approach to creating a simple calendar in Java Swing
I need a simple way to implement Calendar (similar to Google Calendar) in java. The calendar should be displayed Monday through Sunday at the top and every hour in the row.
Monday | Tuesday | Wednesday
08:00
09:00
10:00
11:00
How do I create a calendar in Swing? I am using Netbeans IDE. Each column should contain some text.
Can I just use the table component in swing? If so, can I change it to suit my needs?
a source to share
You probably want to consider using JTable
. You can use AbstractTableModel
to size the table as well as some other properties, then you can fill the top row and first column with the values ββyou want. You can also set up certain parts of the table that your users can edit if you want to be able to enter data into the calendar.
See the JTable documentation for more information .
a source to share