Forums Register Login

DATE

+Pie Number of slices to send: Send
HOW to achive this scenario?.
user might seletct any of the month in the combo box. Assuming user selected jan 26 2006 i should get the date which user selected should be between dec 2005 and feb 2006
+Pie Number of slices to send: Send
Please reserve this forum for advanced questions. I have moved this post to the beginnner's forum.
+Pie Number of slices to send: Send
 

Originally posted by Shyam Sunder:
HOW to achive this scenario?.
user might seletct any of the month in the combo box. Assuming user selected jan 26 2006 i should get the date which user selected should be between dec 2005 and feb 2006



Why use a Date object in the first place? Try using a java.util.Calendar object. As the Calendar class is abstract, you need to write the following code to get a calendar instance:

Calendar cal = Calendar.getInstance();

Your Calendar instance offers you a really vast variety of fields (i.e. pieces of Date information) you can handle in your application (e.g. for setting the selectedIndex values in your ComboBoxes).

I hope this helps,

cheers,


Steffen
eat bricks! HA! And here's another one! And a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 668 times.
Similar Threads
Passed SCJD with 390 / 400 (97,5%)
Problem with date picker
how to pass data from one frame to other
Problem with java script date validation
Date comparision problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:12:19.