Share the ideas and thoughts, become united ...

Saturday, June 11, 2011

DateTime Picker in JDK 7

JDK 7 is in draft stage. The feature list of JDK 7 is great. Existing Java developer will instantly notice the feature list as a blessing :D .

Today I am going to show a JDK 7 SwingX Component, JXDatePicker. As JDK 7 is still in draft phase, You cannot get official JDK7 release. Instead you can download JDK7 Snapshot from this Link.
Now once you have got the JDK7 release you can test out the DatePicker.
JXDatePicker dtPicker = new JXDatePicker(System.currentTimeMillis());
dtPicker.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
          JOptionPane.showMessageDialog(null, datePicker.getDate().toString());
    }
});
Let the JDK prevail ...

No comments:

Post a Comment