datapicker java

Solutions on MaxInterview for datapicker java by the best coders in the world

showing results for - "datapicker java"
Christian
23 Feb 2019
1import Java.text.SimpleDateFormat;
2import Java.util.Calendar;
3import javax.swing.JFrame;
4import javax.swing.JPanel;
5import org.jdesktop.swingx.JXDatePicker;
6
7public class DatePickerExample extends JPanel {
8
9    public static void main(String[] args) {
10        JFrame frame = new JFrame("JXPicker Example");
11        JPanel panel = new JPanel();
12
13        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
14        frame.setBounds(400, 400, 250, 100);
15
16        JXDatePicker picker = new JXDatePicker();
17        picker.setDate(Calendar.getInstance().getTime());
18        picker.setFormats(new SimpleDateFormat("dd.MM.yyyy"));
19
20        panel.add(picker);
21        frame.getContentPane().add(panel);
22
23        frame.setVisible(true);
24    }
25}
26
similar questions
queries leading to this page
datapicker java