tags:

views:

393

answers:

1

I have set some parameters for my JTable, but it seems they are in effect only in what I call "view" mode. When editing cell content, nothing works.

In the screenshot below you can see how the font size reverted back to default. (Large one is what I set and what I want to see).

Also, I have default Locale set to Germany so that my decimal numbers would use commas as in 12,24 (instead of US 12.24 style) - which also stops working as soon as I try editing cell. It reverts back to US dot style, and after I hit Enter it gets displayed with comma again. E.g. if I enter 12,24 cell does not accept it as invalid double. But when I enter 12.24, after I hit Enter, it is displayed as 12,24 - proper German style :)

So in short it looks like cell-in-editing-mode uses a different set of settings... how can I change those or, preferably, make it use the same as in non-editing mode?

cell behavior

+3  A: 

You can set the locale on the component itself, as shown here. For better control you can define your own cell editor, as discussed in this tutorial. In addition to the examples there, here is a complete editor/renderer example.

trashgod