• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Problems with a customized JTextField

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a component that works fine for a lot of things, like register data in different ranges but i found out when i display a INTEGER data(example 11) from DB, it shows wrong.If i put to display with 2 decimals, it shows 0,11(instead of 11,00).with one decimal, it shows 1,1(instead 11,0).The component is below:

Example of how i use:

Where is the mistake?


Best Wishes,
 
Rancher
Posts: 3051
22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No need to create a custom class.

See: How to Use Formatted Text Fields
 
Paul Hayabusa
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks,
Rob Camick , but i found my mistake!
Its just use setValue instead of setText...yeah, very stupid.

Thanks, for your help!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!