repeatedly create DefaultGFrame problem

3 views
Skip to first unread message

harislukman

unread,
Mar 13, 2008, 11:59:18 PM3/13/08
to Gwt Window Manager
hi guys,

i have problem with creating dynamic DefaultGFrame.

i have a button inside the GDesktopPane. when the button is clicked i
want to create a new GFrame.

the problem is after 1 GFrame is created, i can't click on the button
anymore which prevent me to create another new GFrame.

here is my code:

private GDesktopPane desktop;
private void initAll()
{
DefaultGDesktopPane desktopTemp = new DefaultGDesktopPane();
desktop = desktopTemp;

//mainPanel.setLayout(new HorizontalLayout(2));
Button myButton1 = new Button("My Button", new ClickListener()
{
public void onClick(Widget sender)
{
initAll1();
}
});


desktop.addWidget(myButton1, 20, 20);

}

private void initAll1()
{
GFrame frame = new DefaultGFrame("Forex 1");
frame.setWidth(360);
frame.setHeight(300);

frame.setContent("hello world 1");
frame.setVisible(true);
}

public void onModuleLoad()
{
initAll();
RootPanel.get().add((Widget)desktop);
}



anybody have any clue on this? your help is greatly appreciated. thank
you

harislukman

unread,
Mar 14, 2008, 5:25:31 AM3/14/08
to Gwt Window Manager
i solved this problem. the problem is i didn;t do
desktop.setFrame(frame); after i created my frame.

Reply all
Reply to author
Forward
0 new messages