Welcome, Guest. Please login or register.
Did you miss your activation email?
Pages: [1]   Go Down
  Print  
Author Topic: ComboBox for DOB  (Read 1249 times)
0 Members and 1 Guest are viewing this topic.
captainpirate
Junior Member
*

Reputation: 0
Offline Offline
Posts: 4
Referrals: 0

Awards
« on: February 26, 2010, 06:02:05 PM »

I want to make combobox for displaying date of birth.
For example:for year selection  the user can select first two number (ie 19 or 20) from the list(combo) and last two number also from the list(or Combo).
Here i wrote the code for month combobox but i can i write for year and days selection.

Code
GeSHi (java):
  1. [color=green]Label monthlbl=new JLabel("Month");
  2. String[] months = {"January", "February", "March", "April", "May", "June","July", "August", "September", "October", "November", "December"};
  3. JComboBox monthcbx=new JComboBox(months);
  4. add(monthlbl);
  5. add(monthcbx);[/color]
Created by GeSHI 1.0.7.20

Provide me solution.
I hope this post wouldnot be in wrong sub-forum.
Logged
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« Reply #1 on: March 04, 2010, 08:20:48 AM »

you can use the Calendar class to display DOB.
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
captainpirate
Junior Member
*

Reputation: 0
Offline Offline
Posts: 4
Referrals: 0

Awards
« Reply #2 on: March 04, 2010, 10:26:51 AM »

Thanx for help.
I already got the solution dude.
Logged
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« Reply #3 on: March 05, 2010, 05:58:41 AM »

Thanx for help.
I already got the solution dude.

Alright, i was a bit late on the reply but good to hear you solved it.
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Pages: [1]   Go Up
  Print  
 
Jump to:  

Your Ad Here