|
Sunday June 18, 2006 |
|
[TIP] Changing screen size of the emulator
|
TIP
|
It is easy to change the screen size of the Screen Designer in NetBeans Mobility Pack. Right click on the Screen designer and select Screen Size from the popup menu.
You will see immediatelly the change of screen size in Screen Designer but when you run it on the emulator the emulator screen size is still the same.
To change emulator screen size you'll have to change the properties of the emulator. They are in [EMULATOR_INSTALL_DIR]\wtklib\devices\[EMULATOR_NAME]\[EMULATOR_NAME].properties There is plenty of properties in this file. We are interested only in following properties. They are distinguished by red and green color on the picture.
|
- screen.x
- screen.y
- screen.width
- screen.height
- screenPaintableRegion.x
- screenPaintableRegion.y
- screenPaintableRegion.width
- screenPaintableRegion.height
|

It will allow you to change the visible area of the device. The result can look a little bit strange because the display area is still the same only the painting is done into the are that you defined.
You can find more informations how to customize or create new device emulator in BasicCustomizationGuide.pdf document in the Wireless Toolkit [WTK] docs directory.
Note: this document isn't distributed with WTK bundled with Mobility Pack
|
|
( Jun 18 2006, 11:45:00 PM CEST )
Permalink
|
|
Trackback URL: http://blogs.sun.com/lukas/entry/tip_changing_screen_size_of
|
Posted by Seapegasus on June 19, 2006 at 12:55 AM CEST #
Posted by Lukas on June 19, 2006 at 09:35 AM CEST #
Posted by Viggo Navarsete on June 01, 2007 at 09:25 AM CEST #
ad 1) look at http://java.sun.com/j2me/docs/wtk2.2/docs/BasicCustomizationGuide-html/preface.html
I haven't tried to change the look of the emulator yet. However it seems easy. Just provide a emulator skin + define a properties file.
ad 2) you can bundle the images to the application jar and then show them in your midlet
http://www.java-tips.org/java-me-tips/midp/displaying-images-on-mobile-device.html
http://www.java-tips.org/java-me-tips/midp/how-to-download-and-view-a-png-file.html
I hope that it helps. Let me know.
Posted by Lukas on June 01, 2007 at 09:57 AM CEST #
hi ! thanks! bye
Posted by Vu Tran on January 23, 2008 at 09:23 AM CET #