Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

I am developing a window based application and i am using java and Netbeans as its workstation, so I want to know how to define jFormatted field?

user-image
Question added by Mohamed Abukar , IT Consultant , Buuho Trading LLC
Date Posted: 2013/09/19
Mohd shahnawaz khan
by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution

To customize the creation code of a Swing element in NetBeans, right-click the element and selectCustomize code.... In the following pop-up, click the drop-down menu next to the code snippet and selectCustom creation. Then you can specify the code yourself as such:

//And remember do some manipulation to the DecimalFormat  object if u used //

DecimalFormat  df=DecimalFormat.getInstance();

jFormattedTextField=new javax.swing.JFormattedTextField(df);

 

 

 

Isn't it a JFormattedTextField? I don't remember something like JFormattedField.

mukhtar ahmed Ibrahim
by mukhtar ahmed Ibrahim , Software engineer , Norwegian tax administration

 You can set up formatted text fields to type dates and numbers in localized formats. For example, you can specify a mask for typing phone numbers in a particular format, such as (XX) X-XX-XX-XX-XX.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.