Skip to content

Instantly share code, notes, and snippets.

@codenameone
Created January 25, 2016 20:12
Show Gist options
  • Save codenameone/108aa105386ed7c340ad to your computer and use it in GitHub Desktop.
Save codenameone/108aa105386ed7c340ad to your computer and use it in GitHub Desktop.
A border layout sample that demonstrates the center behavior option
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();
@codenameone
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment