O'Reilly logo

LWUIT 1.1 for Java ME Developers by Biswajit Sarkar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

FlowLayout

FlowLayout arranges elements sequentially along a row from left to right. If there is not enough space for a widget on the current row, a new row is started below the first one. By default, the positioning is left justified. However, it is possible to create a flow layout instance that performs right or center justified placement. The following code is for trying out the right and center justified configurations of FlowLayout. We shall leave the default version out of our example here, as we have seen many instances of it in the demo examples of the preceding chapters.

/*****Start of FlowLayout statements*****/ FlowLayout testLayout = new FlowLayout(Component.CENTER); //FlowLayout testLayout = new FlowLayout(Component.RIGHT); demoForm.setLayout(testLayout); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required