• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem with JFormattedTextField in a jar file

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have created 4 JFormattedTextFields. I have the set the format to (###)####-### on the focus event of the text field. Its working fine when running the application from the JBuilder. But when a jar file is created for the application and then try to run the application from the jar file. It is seen that last 3 numbers gets deleted when you focus on that textfield. If you press tab and go to the next formatted text field, it is seen that another 2 numbers gets deleted. How do i avoid this?


Please help me in this regard
Thanks and regards
Smriti
 
Ranch Hand
Posts: 158
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would be more feasible for you to send code, so we can tell you what exactly is the problem.
 
Smriti Anchu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Here cdoc is a file where in the values are stored, and i am trying to fetch the value from the cdoc file.
Do tell me as to what could be wrong in the above file. When the focus is on the textfield, i am setting format again.
Is there any other way to sole the problem. WHen the format is set in the constructor, the format is not actually maintained. i.e., when the fields are populated, when we try to delete, it deletes even the format. So i hae set the format in the focus event of the textfield.


Thanks and regards
smriti
 
reply
    Bookmark Topic Watch Topic
  • New Topic