I basically want a pop up box that the user must agree to. Does this look ok?
Code:
public class WindowPopUp extends PopupWindow {public WindowPopUp(Widget owner, String title, String message) {
super(owner);
setTheme("");
setCloseOnClickedOutside(false);
setCloseOnEscape(false);
ResizableFrame frame = new ResizableFrame();
frame.setTitle(title);
frame.setTheme("popupwarning");
DialogLayout dl = new DialogLayout();
Label messageLabel = new Label();
messageLabel.setText(message);
Button buttonOk = new Button();
buttonOk.setText("OK");
buttonOk.addCallback(new Runnable() {
public void run() {
closePopup();
}
});
dl.setHorizontalGroup(dl.createSequentialGroup(messageLabel));
dl.setVerticalGroup(dl.createSequentialGroup(messageLabel));
dl.setHorizontalGroup(dl.createSequentialGroup().addGroup(dl.createSequentialGroup(messageLabel, buttonOk)));
dl.setVerticalGroup(dl.createSequentialGroup().addGroup(dl.createSequentialGroup(messageLabel, buttonOk)));
frame.add(dl);
add(frame);
openPopupCentered();
}}
I call it like this:
Code:
new WindowPopUp(this, "Warning", "You must restart for 'multiSamples' setting to take effect")
The only other problem is how do I add a image to it?