Created
January 25, 2016 20:12
-
-
Save codenameone/108aa105386ed7c340ad to your computer and use it in GitHub Desktop.
A border layout sample that demonstrates the center behavior option
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
Form hi = new Form("Border Layout", new BorderLayout()); | |
((BorderLayout)hi.getLayout()).setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER); | |
hi.add(BorderLayout.CENTER, new Label("Center")). | |
add(BorderLayout.SOUTH, new Label("South")). | |
add(BorderLayout.NORTH, new Label("North")). | |
add(BorderLayout.EAST, new Label("East")). | |
add(BorderLayout.WEST, new Label("West")); | |
hi.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage code for https://www.codenameone.com/javadoc/com/codename1/ui/layouts/BorderLayout.html
From the Codename One project