Fork us on GitHub

How Do I - Positioning Components Using Layout Managers

Determine where components are placed especially when dealing with varied screen sizes/orientations

Details

  1. The default layout in Codename One is the FlowLayout
  2. Flow Layout - places components using their preferred size and breaks lines. Relatively simplistic and doesn't break lines properly.
  3. Box Layout X/Y - places components in a column/row giving the preferred size on the inverse axis and stretching them on the main axis. X version doesn't break lines and better aligns than flow layout.
  4. Grid Layout - Places components in an even grid where all the elements have an even size.
  5. Table Layout - Places components in a table with constraints for row/column spanning etc.
  6. Border Layout - Places components in one of 5 positions, one of the 4 borders or the center. Supports absolute center mode where the center component isn't stretched.

GUI Builder Events

Handle events in the GUI builder and write code that works with the components within

Read More

Themeing

Use the Codename One Designer to build a custom theme or adapt the builtin themes

Read More

Localization

How to translate my application seamlessly to any language including RTL/BiDi support

Read More