public static void main(String[] args) { JFrame wnd = new JFrame("DateLabel Test"); wnd.setLocation(200, 200); wnd.setSize(300, 300); wnd.setLayout(null); wnd.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); DateLabel lblDate1 = new DateLabel(24, 12, 2014, "dd.MM.yyyy"); lblDate1.setLocation(10, 10); lblDate1.setSize(100, 15); wnd.add(lblDate1); DateLabel lblDate2 = new DateLabel(24, 12, 2014, "MM/dd/yyyy"); lblDate2.setLocation(10, 30); lblDate2.setSize(100, 15); wnd.add(lblDate2); wnd.setVisible(true); lblDate2.setDay(lblDate1.getDay() + 7); } }