For small Swing applications, I like to use the Netbeans GUI Builder. The problem is that there is no date picker. And today, I really needed a date picker. Fortunately, there is a solution. Remember SwingX? It’s built into Netbeans, and it has a good date picker called JXDatePicker. Here’s how to get it on your Swing Controls palette so that you can drag it onto your form.
By “palette”, I mean the view that pops up on the right side of the IDE when you use the GUI Builder. Notice that the Swing Controls palette doesn’t have a date picker of any sort (shame on you Netbeans! This is basic stuff!).
The goal is to get JXDatePicker onto that palette.
1.) Pull up the Palette Manager for Swing/AWT Components.
2.) Click “Add from JAR”
3.) Browse to [NETBEANS HOME]\ide\modules\ext and select swingx-0.9.5.jar
4.) This will bring up a list of all the components available for the palette. Lots of goodies here! Select JXDatePicker.
5.) Select Swing Controls
It will immediately show up on your Swing Controls palette. All that’s left is to drag onto form!
Thanks for reading! If you would like to see what else I’m up to, check out Whiff
Wonder why is this not included by default
thanks
wow this slide
Thanks
thank you for the little tutorials was able to install the date picker onto my netbeans IDE
Thanks for showing how to add the data picker. When I tried it out it appeared to only allow choosing dates in the current month. Is it possible to configure to allow choosing dates in future months as well, or am I missing something obvious?
Thanks,
Charles
Charles,
I’m not in a position to answer this at the moment. I’m in a new environment where I’m using Eclipse and GWT. Perhaps someone else will come along and answer. Good luck.
thanks it saved lot of time
When I use this chooser, the arrows at the top allow you to scroll through the months. Setting future dates is no problem.
Hello, It was my mistake. It would only show the current month in “Design Preview” mode. When I actually ran my application the date picker was fully functional, allowing me to choose dates in other months by scrolling using the arrows Andy mentions. Thanks for your consideration. – Charles
thank u
how to change jxDatePicker format in netbeans
I’m not sure I understand your question, shubangi
I’ve been stuck in this conundrum for a hour.
Knowing that it was soo easy makes me wanna kill myself. LOL.
THANK YOU SO MUCH :-*
it’s very helpful l tutorial thank you
Thank you
You’ve been a blessing
Thank you and more power…
how to perform step three.i am confused
Click “Add From Jar”. It should give you some sort of file selector that allows you to browse to where ever you installed Netbeans. From there, browse to ide\modules\ext and select swingx-0.9.5.jar by clicking each directory until you get to the jar file. I don’t know what else to tell you.
Thank you
thank you very much! Helped me a lot!
Wow…thnx man !
Thanks very much!! I worked 🙂
As old as this post is, I’m surprised that Netbeans hasn’t addressed this issue, yet. Glad it can still be of use!
ohhhhh thanks its worked 😀
this help me a lot
Thanks mate.. This was exactly I was searching for and you saved my day!
Thanks a lot man! Great help 🙂
When i added the datepicker in my palette i dragged and dropped it over the frame i wanted to put it6 in yet i am not getting any output of the container. Do i need to drop it over any other container or simply drop it over the frame. and after doing this , the code snippet should be mentioned in where? the frame? i may sound ambiguous but any sort of help would be helpful. i am new to this
^ sorry to mention the code snippet. please tell me how to sucessfully drag and drop and make the container visible.
I don’t know what your problem is, but I would always use JPanels within a frame. Perhaps that will fix the problem. Dunno
Thanks a lot! Was wondering how to get a date picker.
Well forgot to mention that now the jar file is: swingx-all-1.6.4.jar
thanks sir
Exelent
Thanks
Thanks for this useful thread !!
Hello! And thank you for your article!
I have a doubt. How can I see where the new components are? I mean: if I create a new component and I add it to the palette, what file is saved in?
Thank you in advance!
This is outside of the scope of this article. A google search gave some promising results. Thanks for reading.
Thank you ….. Good to know the easy way
The JXDatePicker component can have some disadvantages. In particular, I wish it had buttons for changing the year.
I’ve been using a swing component called LGoodDatePicker
(Github: https://github.com/LGoodDatePicker/LGoodDatePicker ).
There are screenshots at the github page. There is also a nice demo (executable jar file) under the release section.
Cheers!
Thanks!
Is there a Javadoc source for the JX components? I can’t find anything obvious.
http://javadoc.geotoolkit.org/external/swingx/
how can i get a text from jYear chooser? i am new on this please help me thanks
That great, thanks anyway
thanks dear…you made my day…
This is fantastic! Thanks so much for figuring this out and taking the time to post the solution!
Thanx Man 🙂
I have date in 07-05-2016 in this format
plz give me sugestion
Many thanks David. Yours was the first result I found when I hit the search engine. Every once in a while one finds a useful sought after gem online. Bravo!
thanks
Thank you man!
Very useful
Thank you deeply!
You’re welcome, sincerely!
Thanks so much. I’m working in netbeans 8.0.2. I had to make a few guess’s in the procedure but it is now working in my app perfectly. The type for the date is Date. Now I need to find out how to parse the date to get a string that
has the format mm/dd/yyyy.
HUGE help thank you!
Génial, merci…
Whoa man that was effing straight!! Why can’t every tutorial explain things like you do? Keep it up!!! Thanks a lot!
Thanks!
Thank you very much!!!
Very useful. Thanks man:)
This is LIT!
Thanks!
Thank you so much!!! very usefull
thank you so much
thanks mate
thnax for you
Thaks men, was useful
I have been having the same issue but am now sorted. Thanks for this article.
Thanks David! I was wondering if Eclipse has the same ability to import a GUI Date picker to their control palette as well. If not, I may consider switching over to Netbeans.