Shikhar13 / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Text entry in Dialog does not invalidate form when menu bar updates #239

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Show a blank form. Run the following code. Enter some text in the textfield. 
Bam!

public static void showEditPopup() {
        final Dialog dialog = new Dialog();

        Button cancelbutton = new Button("Cancel");         
        cancelbutton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                dialog.dispose();               
            }
        });

        Button submitbutton = new Button("Confirm");            
        submitbutton.addActionListener(new ActionListener() {           
            public void actionPerformed(ActionEvent evt) {
                dialog.dispose();               
            }
        });

        Container buttonContainer = new Container(new BorderLayout());      
        buttonContainer.addComponent(BorderLayout.WEST, cancelbutton);
        buttonContainer.addComponent(BorderLayout.EAST,  submitbutton);

        Container container = new Container();
        container.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
        container.addComponent(new TextField());
        container.addComponent(buttonContainer);

        Container wrapcontainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));
        wrapcontainer.addComponent(container);

        dialog.setTitle("Enter some stuff");
        dialog.addComponent(wrapcontainer);
        dialog.setDisposeWhenPointerOutOfBounds(true);  
        dialog.showPacked(BorderLayout.CENTER, true);
    }

Original issue reported on code.google.com by jkoo...@gmail.com on 4 Jul 2012 at 2:53

GoogleCodeExporter commented 9 years ago
Assigning to Chen

Original comment by shai.almog on 4 Jul 2012 at 3:31

GoogleCodeExporter commented 9 years ago
run in J2ME. The menu bar paints, pushing the buttons of my dialog out of 
cliprect .ie dissapearing

Original comment by jkoo...@gmail.com on 4 Jul 2012 at 3:42