1 33 34 package com.nqadmin.swingSet.formatting; 35 36 import javax.swing.text.DateFormatter ; 37 import java.text.DateFormat ; 38 import java.text.SimpleDateFormat ; 39 import java.util.Locale ; 40 41 import java.io.Serializable ; 42 import java.text.ParseException ; 43 44 45 49 public class SSDateFormatterFactory extends javax.swing.text.DefaultFormatterFactory implements Serializable { 50 51 public SSDateFormatterFactory() { 52 this.setDefaultFormatter(new DateFormatter (new SimpleDateFormat ("DD/mm/yyyy"))); 53 this.setNullFormatter(null); 54 this.setEditFormatter(new DateFormatter (new SimpleDateFormat ("ddMMyyyy"))); 55 this.setDisplayFormatter(new DateFormatter (new SimpleDateFormat ("MMM dd, yyyy"))); 56 } 57 } 58 59 60 75 | Popular Tags |