• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Gui button with calendar popup

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a form where the date should be entered. Right now, I enter a text format. I would like to add a calendar popup to allow selection of the date. The calendar should allow switching year since most of the dates would be from more than 6 years ago.

Can you provided suggestions on how to implement a calendar popup? Is this part of swing?

John
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I typed "java calendar popup" into Google and got this as the first link returned: Java Swing Calendar Popup Button.

I haven't reviewed this code in any way but if you're looking for the feature (instead of a coding opportunity) I recommend you do that. It's not the only possibility I got from my web search either.
 
John Vorwald
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the suggestion, I did try a few google searches.
Here are some other good links, but haven't tried them yet:
http://www.java2s.com/Product/Java/Swing/Calendar-Date-Time.htm
http://www.java2s.com/Code/Java/Swing-Components/JavaDateChooserComboBox.htm

John
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have implemented a Calendar popup inside a Combo Box using one such resource. I don't remember the resource source. I have attached here the DateComboBox i have used.
It should be initialized like below


 
John Vorwald
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that works fine...

John
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic