This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calendar Control

 
Justin Char
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import org.jdesktop.swing.JXDatePicker;

Does anyone have a better Calendar Control than the above?
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really. I have written my own DateChooser which uses a JSpinner for the year and a JSpinner with a SpinnerListModel and a custom combo box spinner editor for the months (loaded from the default locale or a specified locale) but for the rest it's basically the same.

I also written a DateSelecter class which does the same but can have a custom controller for changing the month and year, and can also have multiple controllers (like the arrow thingy of JXDatePicker or the spinners from DateChooser).

Neither have a one-line control though, although you could use a regular JSpinner and a button behind it that shows the dialog. That's mostly how I use them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic