Skip to content

Instantly share code, notes, and snippets.

@vivainio
Created September 13, 2012 07:39
Show Gist options
  • Save vivainio/3712638 to your computer and use it in GitHub Desktop.
Save vivainio/3712638 to your computer and use it in GitHub Desktop.
Raw java
---------
f.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
ComponentGroup buttonGroup = new ComponentGroup();
Label buttonLabel = new Label("Buttons");
buttonLabel.setUIID("TitleLabel");
f.addComponent(buttonLabel);
final Button left = new Button("Left Alignment");
final Button right = new Button("Right Alignment");
final Button center = new Button("Center Alignment");
buttonGroup.addComponent(left);
buttonGroup.addComponent(right);
buttonGroup.addComponent(center);
f.addComponent(buttonGroup);
YAML
-----
Container:
layout:
BoxLayout:
axis: y
children:
ComponentGroup:
id: buttonGroup
Label:
text: "Buttons"
uiid: "TitleLabel"
Button:
text: "Left Alignment"
id: left
Button:
text: "Right alignment"
id: right
Button:
text: "Center alignment"
id: center
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment