Lukas Hasik's notes about work life (and more)

XML

Subscribe to Lukas Hasik's Weblog on your cell phone Powered by Technorati

Let's have a ride
« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today


Today's Page Hits: 1049

my.netbeans.org

News in pictures


the links



Recent Entries

Lukas Hasik's Weblog
All recent entries

Licence Info

This work is licensed under a Creative Commons License
LICENCE

Map of visitors

Locations of visitors to this page
Listed on BlogShares


20060618 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


Comments [5] ( Jun 18 2006, 11:45:00 PM CEST ) Permalink del.icio.us furl simpy slashdot technorati digg

Trackback URL: http://blogs.sun.com/lukas/entry/tip_changing_screen_size_of
Comments:

Perfect, thanks for the info, that was just what I needed.

Posted by Seapegasus on June 19, 2006 at 12:55 AM CEST #

you're welcome. I'm glad to help.

Posted by Lukas on June 19, 2006 at 09:35 AM CEST #

Hi Lukas, since you know a lot about the WTK, I wonder if you know how to replace the bundled images used in the emulator when taking snapshots with other images. See my other post for details: http://forum.java.sun.com/thread.jspa?threadID=5178804 In advance, thanks a lot :) </viggo>

Posted by Viggo Navarsete on June 01, 2007 at 09:25 AM CEST #

2 Viggo: I'm confused. Do you want to change the look of the emulator(1) or do you just want to show some images in the emulator(2)?

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 #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed


Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.