vendredi 17 janvier 2020

Dynamic create JTable in runtime

i'm trying create jtable use users pojo class. User create pojo class, i load him in runtime and create jtable. Say me,please, how i can do doing that?

String loadedClass = array.getJSONObject( 0 ).getString( "value" );
Class customFilterClass = new LoaderDynClass( getContext(), pack ).loadClass( loadedClass, true );

customFilterClass - users class type

StringReader reader = new StringReader( filterList );
//customFilterClass extent FilterTableModel. FilterTableModel parent abstract class
List<FilterTableModel> filterTableModelList = objectMapper.readValue( reader, new TypeReference<List<FilterTableModel>>(){} );

i can doing that with reflection API, but i'm don't know how receive List list. And how indicate type for my List

So sorry my english))





Aucun commentaire:

Enregistrer un commentaire