If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator 
Device

Hi,

I can not make it work.

My code:

    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;
    }

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/d4e74487-5f5b-4907-a691-422c4bc01550%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to