Skip to main content

Absolute Positioning?

2 replies [Last post]
gw1921
Offline
Joined: 2009-04-22
Points: 0

Hi

I'd like to not use a layout. If I try form.setLayout(null); it crashes at startup. Any idea how I can get away with absolute positioning?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
Use coordinate layout and search the forum.
> Hi
>
> I'd like to not use a layout. If I try form.setLayout(null); it crashes at startup. Any idea how I can get away with absolute positioning?
> [Message sent by forum member 'gw1921' (gw1921)]
>
> http://forums.java.net/jive/thread.jspa?messageID=343505
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

gw1921
Offline
Joined: 2009-04-22
Points: 0

I managed to make an empty LayoutManager that allows me to setX/Y of each component and not rely on any layout (we've ended up supporting only a small range of device sizes since the design won't work on all screens).

However now I can't figure out how to set the list's size (it needs to use the full client area height on the form). If I set this to 480 (screen's actual height), the selector gets hidden behind the bottom menu bar. I suppose I need to set the list's height to the actual client area (i.e. 480 - TOP Title Bar - Bottom Menu Bar) in order to get it right.

How can I obtain heights of the menu bar and the title bar? Please help!