An Helper class for basic styling in Codename One, which provides an alternative to having endless UDIDs
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Stubber.jar First commit Dec 14, 2016
build.xml Added methods for setting a different pressed state foreground and ba… Feb 4, 2017


A Helper library for basic styling using code in Codename One. This eliminates the need to have endless UIID in your GUI builder

Download Helper.cn1Lib to the Lib folder of your project. Go to your project and do Refresh cn1Lib files. Call new Helper(myCmp) only AFTER setUIID() method and not BEFORE.


View the project JavaDoc here.

Usage example

Basic styling of a single component

 Label myLabel = new Label("Test Label");
 new Helper(myLabel).pa1().ma0().textGreen().bgColor(0xe1e1e1);

Style a single component with custom Unit

Label myLabel = new Label("Test Label");
new Helper(myLabel, , Style.UNIT_TYPE_PIXELS).pa1().ma0().textGreen().bgColor(0xe1e1e1);

Apply same style to multiple unrelated components, individual styles could still be applied

Button myButton = new Button("Test Button 1");
Label myLabel = new Label("Test Label");
SpanLabel mySpanLabel = new SpanLabel("Test SpanLabel");
new Helper(myButton, myLabel, mySpanLabel.getComponentAt(1)).pa1().ma0().textGreen().bgColor(0xe1e1e1);


You are welcome to add more styling. Fork the project and commit your code. You can also improve the documentation, methods and classes used.