Created
January 27, 2016 21:02
-
-
Save codenameone/cd69363cc953f6bdb66c to your computer and use it in GitHub Desktop.
Sample of the grid layout from 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
Form hi = new Form("Grid Layout 2x2", new GridLayout(2, 2)); | |
hi.add(new Label("First")). | |
add(new Label("Second")). | |
add(new Label("Third")). | |
add(new Label("Fourth")). | |
add(new Label("Fifth")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage code for GridLayout
Demonstrates that even though the grid was created with 2x2 spaces, adding 5 elements will implicitly add another row and leave the last cell blank.
From the Codename One project