Created
February 12, 2016 08:09
-
-
Save codenameone/ba27124a0a25e685b123 to your computer and use it in GitHub Desktop.
Simple Tabs component sample from Codename One
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
Form hi = new Form("Tabs", new BorderLayout()); | |
Tabs t = new Tabs(); | |
Style s = UIManager.getInstance().getComponentStyle("Tab"); | |
FontImage icon1 = FontImage.createMaterial(FontImage.MATERIAL_QUESTION_ANSWER, s); | |
Container container1 = BoxLayout.encloseY(new Label("Label1"), new Label("Label2")); | |
t.addTab("Tab1", icon1, container1); | |
t.addTab("Tab2", new SpanLabel("Some text directly in the tab")); | |
hi.add(BorderLayout.CENTER, t); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample usage code for Tabs.
From the Codename One project