• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with JFormattedTextField in a jar file

 
Smriti Anchu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
Anand Karia
Ranch Hand
Posts: 156
Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!