Skip to content

Instantly share code, notes, and snippets.

@codenameone
Created February 15, 2016 13:01
Show Gist options
  • Save codenameone/55b73c621fea0263638a to your computer and use it in GitHub Desktop.
Save codenameone/55b73c621fea0263638a to your computer and use it in GitHub Desktop.
Sample code for the SpanLabel Codename One component
SpanLabel d = new SpanLabel("Default SpanLabel that can seamlessly line break when the text is really long.");
d.setIcon(icon);
SpanLabel l = new SpanLabel("NORTH Positioned Icon SpanLabel that can seamlessly line break when the text is really long.");
l.setIcon(icon);
l.setIconPosition(BorderLayout.NORTH);
SpanLabel r = new SpanLabel("SOUTH Positioned Icon SpanLabel that can seamlessly line break when the text is really long.");
r.setIcon(icon);
r.setIconPosition(BorderLayout.SOUTH);
SpanLabel c = new SpanLabel("EAST Positioned Icon SpanLabel that can seamlessly line break when the text is really long.");
c.setIcon(icon);
c.setIconPosition(BorderLayout.EAST);
hi.add(d).add(l).add(r).add(c);
@codenameone
Copy link
Author

Sample usage of SpanLabel.

From the Codename One project

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