Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create a Calendar

 
Praveen Sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to Swing. I want to add a calendar control to my swing application. Please suggest me how to create a calendar component.
 
Maneesh Godbole
Saloon Keeper
Posts: 11178
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you will need the following things
1) A panel or some suitable container with a grid layout
2) Labels to display the week days as well as the dates
3) GregorianCalendar has all the methods you will require to figure out stuff like leap year, number of days in a month, day on a particular date etc.
4) If you want to make the calendar more interactive (user clicks on some date and views say his appointments for that particular date, use buttons instead of labels.
 
zohaib shiekh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JCalender provide a facility to integrate Calender component with your Swing application
Download this Component from webpage
and mzohaib91.blogspot.com
 
Campbell Ritchie
Sheriff
Pie
Posts: 50225
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the same as this calendar?
 
zohaib shiekh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No this component is more easy then this
its very easy to integrate with swing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic