Created
February 15, 2016 12:08
-
-
Save codenameone/d1db2033981c835fb925 to your computer and use it in GitHub Desktop.
Simple usage of the InteractionDialog class in Codename One
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InteractionDialog dlg = new InteractionDialog("Hello"); | |
dlg.setLayout(new BorderLayout()); | |
dlg.add(BorderLayout.CENTER, new Label("Hello Dialog")); | |
Button close = new Button("Close"); | |
close.addActionListener((ee) -> dlg.dispose()); | |
dlg.addComponent(BorderLayout.SOUTH, close); | |
Dimension pre = dlg.getContentPane().getPreferredSize(); | |
dlg.show(0, 0, Display.getInstance().getDisplayWidth() - (pre.getWidth() + pre.getWidth() / 6), 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage of InteractionDialog.
From the Codename One project