A date chooser in a JComboBox
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stefan_Stefansson
Posted On:   Monday, November 19, 2001 06:24 AM

Hello.
I'm trying to get a date chooser component to display in a drop down fashion but not having much success. What I have is a date chooser object but I need the drop down functionality. The date chooser is simply a panel so my question is: can I put a panel inside a JComboBox in some way?


Kind regards, Stefan.


p.s. if somebody knows of a date chooser object which has this functionality (being in a drop down box) please let me know also.

Re: A date chooser in a JComboBox

Posted By:   John_Z  
Posted On:   Sunday, December 2, 2001 05:08 PM

If you will share your date chooser with me, I'll build the combo part. :-)

Basically you have to create your own combo box like thing, you can't use an actual JComboBox without much pain.

Your 'display' component would be a label + button, with borders, etc. so it looked just like a combo box. When the user clicks the button, display a JPopupMenu over the display components that contains the panel with your chooser bits in it.
About | Sitemap | Contact