Created
January 28, 2016 12:47
-
-
Save codenameone/573f73164df4af00b7b1 to your computer and use it in GitHub Desktop.
A more elaborate example that shows off complex Codename One TableLayout usage
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
TableLayout tl = new TableLayout(2, 3); | |
Form hi = new Form("Table Layout Cons", tl); | |
hi.setScrollable(false); | |
hi.add(tl.createConstraint(). | |
widthPercentage(20), | |
new Label("AAA")). | |
add(tl.createConstraint(). | |
horizontalSpan(2). | |
heightPercentage(80). | |
verticalAlign(Component.CENTER). | |
horizontalAlign(Component.CENTER), | |
new Label("Span H")). | |
add(new Label("BBB")). | |
add(tl.createConstraint(). | |
widthPercentage(60). | |
heightPercentage(20), | |
new Label("CCC")). | |
add(tl.createConstraint(). | |
widthPercentage(20), | |
new Label("DDD")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage code for TableLayout
From the Codename One project