MessageBox

Overview

MessageBox is a popup element that shows a title, a text and one or more buttons.

Source Code

MessageBoxSample.java
anybutton.addPressListener(new PressListener() {
    @Override
    public void controlPressed(ControlEvent e) {
        mb = new MessageBox("Did you know?", someMessage, new String[]{"Nice!"});
        mb.setRect(CENTER, CENTER, SCREENSIZE + 50, SCREENSIZE + 30);
        mb.setBackForeColors(Colors.P_300, Colors.ON_P_300);
        mb.popup();
    }
});

Because it is an extensive example, we chose to exemplify the essential: how to use a MessageBox. To see the complete example, click here.

Attributes

Methods

References

Last updated