Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2008, 10:05 PM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Validation For JFormattedTextField

Hi,
  In my application we have JFormattedTextField to enter amount or Budget.
I need to restrict the size(min-max 4-15 characters) as well as check the Input characters entered in the JFormattedTextField.
I have written code like this:

 MaskFormatter formatter = new MaskFormatter("***************");
formatter.setValidCharacters("0123456789Rs./-$");
        t1 = new JFormattedTextField(formatter);

 It is accepting specified characters but if I enter characters lessthan 15 it is showing error.please help me regarding this.
      Thanking You.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
Validation using Validation Framework kalyangvd Struts 1 January 2nd, 2008 06:53 AM
Input validation in JFormattedTextField harini19 Java Basics 2 November 14th, 2006 01:50 AM
Info On JFormattedTextField harini19 Java Basics 0 February 15th, 2006 12:55 AM
Validation koneruvijay VS.NET 2002/2003 2 January 20th, 2004 08:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.