rutsatz / echo3ext20

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

Can't add a Button to a BorderLayout Panel #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I add a Button to a panel with BorderLayout, and set the 
Button's layout to north, then it will throw error:
this.panel.getSize is not a function
If I change the button to TextField, it works fine.

Code likes below:

public class BorderLayoutTest extends Panel implements DeferredUiCreate{

    public BorderLayoutTest() {
        super( new BorderLayout(), "Border Layout Test");
    }

    @Override
    public void createUI() {
        Button button = new Button( "T");
        button.setLayoutData( new BorderLayoutData( BorderLayout.NORTH));
        Panel panel = new Panel( "Simple Panel");
        panel.setLayoutData( new BorderLayoutData( BorderLayout.CENTER));
        add( button);
        add( panel);
    }

}

Original issue reported on code.google.com by simon...@gmail.com on 30 Apr 2009 at 4:11

GoogleCodeExporter commented 8 years ago
Change to Low Priority as workaround exists (put the button in a Panel or other
Container).

Original comment by lloyd.colling@gmail.com on 7 May 2009 at 8:24