Skip to content

Instantly share code, notes, and snippets.

@codenameone
Created February 8, 2016 09:22
Show Gist options
  • Save codenameone/3bfd03a497bc09700128 to your computer and use it in GitHub Desktop.
Save codenameone/3bfd03a497bc09700128 to your computer and use it in GitHub Desktop.
Label icon/text alignment in Codename One
Label left = new Label("Left", icon);
left.setTextPosition(Component.LEFT);
Label right = new Label("Right", icon);
right.setTextPosition(Component.RIGHT);
Label bottom = new Label("Bottom", icon);
bottom.setTextPosition(Component.BOTTOM);
Label top = new Label("Top", icon);
top.setTextPosition(Component.TOP);
hi.add(left).add(right).add(bottom).add(top);
@codenameone
Copy link
Author

Sample usage code for Label

From the Codename One project

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