GUI
package Trial;
import java.awt.Font;
import java.util.Date;
import javax.swing.JFrame;
import com.toedter.calendar.JDateChooser;
public class Demo2 {
JFrame frame;
JDateChooser checkin;
public Demo2() {
frame = new JFrame("Hancie e-Learning Studio");
frame.setSize(650, 450);
frame.setLocationRelativeTo(null);
frame.getContentPane().setLayout(null);
Date date=new Date();
checkin = new JDateChooser();
checkin.setMinSelectableDate(date);
checkin.setDateFormatString("yyyy-MM-dd");
checkin.setFont(new Font("Verdana",Font.PLAIN,18));
checkin.setBounds(200,150,200,30);
frame.add(checkin);
frame.setVisible(true);
}
public static void main(String[] args) {
new Demo2();
}
}
Output