i am trying to use JDateChooser in my JFrame.(code not Beans IDE).How do i make an istance of JDateChooser class and add it to JFrame.
import com.toedter.calendar.JDateChooser;
import com.toedter.calendar.JDateChooserBeanInfo;
import com.toedter.calendar.JDateChooserCellEditor;
import javax.swing.*;
import java.awt.*;
class main extends JFrame
{
JDateChooser cdate;
main()
{
cdate = new JDateChooser();
add(cdate);
setSize(400,200);
setLayout(new FlowLayout());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
}
To get the date, you can do-
Edit: Based from comment-