JavaFX - Get TableView column by name -


is there way column tableview name?

when need column have index:

tableview.getcolumns().get(i); 

but column name:

tableview.getcolumns().get("column name"); 

it's hard envision situation in couldn't keep references columns, can write method like

private <t> tablecolumn<t, ?> gettablecolumnbyname(tableview<t> tableview, string name) {     (tablecolumn<t, ?> col : tableview.getcolumns())         if (col.gettext().equals(name)) return col ;     return null ; } 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -