1

I have created a simple JTable where some Persian strings and numbers are going to be entered through.

I have used some Persian fonts for the JTable and I can see the strings and numbers without any problem in the table, but as I have also used some mathematical operations in some columns of the table; unfortunately the JTable cannot recognize the Persian numbers; when I'm going to get the numbers from table model I get NumberformatException and the table model cannot identify them as numbers.

Any idea ?

Many thanks.

kleopatra
  • 50,242
  • 28
  • 96
  • 201
tokhi
  • 19,860
  • 23
  • 91
  • 104

1 Answers1

2

I think that the answers to this question addresses your question:

(The title is misleading ... it is really about converting Persian number strings to Java ints.)


I think that the JTable is a red herring. AFAIK, JTable doesn't allow you to do "arithmetic operations" on regular number strings either.

Community
  • 1
  • 1
Stephen C
  • 669,072
  • 92
  • 771
  • 1,162
  • Thanks Stephen C, This seems to be working, I will check it on later. You are right, but I get the value of specific columns cast them to double and then after the operation I set back the result value to the intended column. – tokhi Nov 29 '11 at 08:37