If you are experiencing an issue please mention the full platform your issue applies to:
I can not make it work.
private Container creaContenedorLista1(Lista1 lR1) {
Label lbImagen = new Label();
Button nombre = new Button();
SpanLabel descripcion = new SpanLabel();
nombre.setUIID("MultiLine2");
nombre.setFocusable(true);
descripcion.setUIID("MultiLine3");
descripcion.setFocusable(true);
Container cnNombre = new Container(new BoxLayout(BoxLayout.X_AXIS));
cnNombre.addComponent(nombre);
Container cnDatos = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cnDatos.addComponent(cnNombre);
cnDatos.addComponent(descripcion);
Container cnItem = new Container(new BoxLayout(BoxLayout.X_AXIS));
cnItem.addComponent(lbImagen);
cnItem.addComponent(cnDatos);
Container cnS1 = new Container(new BorderLayout());
cnS1.setLayout(new BoxLayout(BoxLayout.X_AXIS));
cnS1.getStyle().setBorder(Border.createBevelLowered());
cnS1.addComponent(new Label());
Container cnt = new Container(new BoxLayout(BoxLayout.Y_AXIS));
cnt.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
cnt.addComponent(cnItem);;
cnt.addComponent(cnS1);
cnt.setLeadComponent(nombre);
nombre.setText(lR1.getNombre());
descripcion.setText(lR1.getDescripcion());
try {
lbImagen.setIcon(Image.createImage("/" + imagenItem(lR1.getTipoLista())));
} catch (IOException ex) {
Dialog.show("Error", ex.getMessage(), "Continuar", null);
}
nombre.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
if (ae.isLongEvent()) {
Dialog.show("Prueba", "Espera por mucho tiempo", "continuar", null);
} else {
Dialog.show("Prueba1", "Rápido", "continuar", null);
}
}
});
return cnt;
}