Thanks for your response sedj. Nope , my requirements are pretty basic. Just want 2 know the best way of performing String formatting.
My solution is basically :
String in=getUnformattedPhone();
in=in.replace(".","");
Object out=null;
MaskFormatter mf=new MaskFormatter()...