I am newly using GWT.
I am using a simple code to create popup I add few labels ontop and show()
final PopupPanel popup = new PopupPanel();
popup.setTitle("Start connector");
popup.add(new Label("Hello"));
popup.center();
popup.show();
Now I need two things:
- freeze the background when the popup is displayed
- the setTitle() does not add the title to the popuppanel window.
any hints will be useful.
Regards, Rohit
Have a look at
setGlassEnabled.From the PopupPanel javadoc:
Just an advice: do not use the “modal” behavior of PopupPanel, it’s way too buggy to be usable.
setGlassEnabledwas added later as a replacement (not fully equivalent, but behaving reliably), andsetModalis only kept there for backwards compatiibility.As the javadoc says:
You’re responsible for the PopupPanel’s content. Either you put a Label or whatever in the PopupPanel and make it look like a “title”, or you can use a DialogBox.