TableView help
Dirk Lemmermann
dlemmermann at gmail.com
Wed May 13 08:30:03 UTC 2020
Hi John,
the model class used by your TableView is called “SimpleImmutableEntry”. The middle part of this name should be enough to tell you what the problem is :-)
Solution: create your own custom model class and provide setters and getters for “key” and “value”. Then the TableView will write back into your POJO.
In other news: this mailing list is meant for "Technical discussion related to the OpenJFX Project”, so you might wanna find a different place for support questions like this one. In this mailing list we discuss things like bugs in OpenJFX and their potential fixes.
Dirk
> On 13 May 2020, at 02:05, John Scancella <john.scancella at gmail.com> wrote:
>
> Hello All,
>
> I am hoping to get some help with setting up a TableView. What I want is a
> simple two column table with each column containing Strings. I want to be
> able to double click to create a new row if I double clicked on empty
> space. And I want to be able to edit any cell already in the table.
>
> Currently I am struggling with editing the data already in the table. I can
> click and edit, but then if I double click again on the cell it reverts
> back to the original value. If I try and get the value programmatically, it
> is still getting the original value, even though the display is showing the
> new value.
>
> You can see my code here: https://github.com/jscancella/heirloom
> I am using java version "1.8.0_251"
>
> Thank you in advance for any help!
>
>
> --
> ~John Scancella
More information about the openjfx-dev
mailing list