Log in

View Full Version : How to create a JMESA checkbox with Java



CarlotaVina
12-19-2019, 04:37 PM
I work with JMESA, JAVA and I need a checkbox

I have the following code Java

HtmlColumn activo = new HtmlColumn("activo");
activo.getCellRenderer().setWorksheetEditor(new CheckboxWorksheetEditor());
activo.setTitle("titulo");
activo.setFilterable(false);
activo.setSortable(false);
htmlRow.addColumn(activo);


When I run the project I get the error

java.lang.IllegalStateException: Not able to convert the value for the checkbox.
Causa
Not able to convert the value for the checkbox.


How can I create a JMesa checkbox with JAVA?

BrianEsti
11-13-2020, 09:55 AM
You try this

JCheckBox checkbox = new JCheckBox();

checkbox.setText("Enable logging");
checkbox.setSelected(true);
checkbox.setIcon(icon);