Skip to content

Instantly share code, notes, and snippets.

@codenameone
Forked from chen-fishbein/Accordion.java
Last active July 8, 2020 09:57
Show Gist options
  • Save codenameone/2b48d1650d8c5032d094066c79922cf1 to your computer and use it in GitHub Desktop.
Save codenameone/2b48d1650d8c5032d094066c79922cf1 to your computer and use it in GitHub Desktop.
Accordion usage
Form f = new Form("Accordion", new BorderLayout());
Accordion accr = new Accordion();
accr.addContent("Item1", new SpanLabel("The quick brown fox jumps over the lazy dog\n"
+ "The quick brown fox jumps over the lazy dog"));
accr.addContent("Item2", new SpanLabel("The quick brown fox jumps over the lazy dog\n"
+ "The quick brown fox jumps over the lazy dog\n "
+ "The quick brown fox jumps over the lazy dog\n "
+ "The quick brown fox jumps over the lazy dog\n "
+ ""));
accr.addContent("Item3", BoxLayout.encloseY(new Label("Label"), new TextField(), new Button("Button"), new CheckBox("CheckBox")));
f.add(BorderLayout.CENTER, accr);
f.show();
@codenameone
Copy link
Author

Sample usage of the Accordion component.

From the Codename One project

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