• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Gui button with calendar popup

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • 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: 25833
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks, that works fine...

John
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic