JXDatePicker startDatepick = new JXDatePicker(); //1、新建一个对象出来 startDatepick.setFormats(formatter); //2、设置setFormats startDatepick.setPreferredSize(new Dimension(170,25)); //设置空间大小