This article applies to BlackBerry® wireless devices based on Java™.
Through the use of nesting managers (adding one manager to another manager), you can create various field layouts on the screen. By selecting the managers that are enabled for scrolling, you can also control how a user interacts with the fields on the screen.
The sample project included in the sample.zip file has an example that explains the creation of a screen containing a series of scrollable rows and columns, where each column has a heading that is always shown. The following are examples of screens:
The sample.zip file assumes the data to be in a fixed-size range. If the data in your application varies in size, you will need to resize the column headings appropriately. The Font.getAdvance method can be used to determine the width (in pixels) of a string shown in a specific font. This could be used to calculate the width of your data or columns if it has dynamic sizes. With this information, you could add the appropriate number of spaces to align the data or the column heading fields.