• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFormattedTextField

 
Robert Upshall
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need some help validating input, with the code below it validates type and field length but it requires me to pad data with zeros to fill out the mask. How can I use JFormattedTextField to do what I want to do, or can I?
// code snipet
try
{
fmt = new MaskFormatter("###########");
}
catch (ParseException ex)
{
// handle
}
number = new JTextField(fmt);
//

I have tried a few different things but none of them do exactly what I am need.
Robert
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!