Skip to content

Una alternativa fácil para trabajar con jTable: implementación de modelo de tabla genérica usando reflection

License

Notifications You must be signed in to change notification settings

NazarioLuis/xTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xTable

Una alternativa súper fácil para trabajar con jTable: con una implementación de modelo de tabla genérica usando reflection

//.........
table = new AwesomeTable();
//.........

String columns[] = {
      "id",
      "firstName+lastName=>Nombre y Apellido",
      "credit=>Crédito",
      "address=>Dirección",
      "active=>Activo"
    };

table.config(columns);

table.addCondition(3, Color.green, Comparison.BETWEEN, 5000, 10000);
table.addCondition(5, Color.red, Comparison.EQ, false);

List<Customer> customers = new ArrayList<>();

Customer customer1 = new Customer();
customer1.setId(1);
customer1.setFirstName("Name1");
customer1.setLastName("LastName1");
customer1.setActive(true);
customer1.setCredit(8000d);
customers.add(customer1);

Customer customer2 = new Customer();
customer2.setId(2);
customer2.setAddress("Address2");
customer2.setFirstName("Name2");
customer2.setLastName("LastName2");
customer2.setActive(true);
customer2.setCredit(100000d);
customers.add(customer2);

table.setData(customers);

About

Una alternativa fácil para trabajar con jTable: implementación de modelo de tabla genérica usando reflection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages