[TIP] Add icon to your MIDlet

Are you bored with only text displayed on your phone. Why not show an icon with your midlets? You can add an icon to MIDlet suite and even to every MIDlet in suite.

MIDlet suite icon
Use Midlet-Icon attribute in jad and jar's Manifest.mf You can do it easily in 'Project Properties > Application Descriptor > Attributes'. 'Add..' the attribute and specify the path to the icon in the jar - this path is the same as path to the icon in your project in most cases.



MIDlet icon
First add your icons, images to a directory in your project. Copy them in a File Manager (Windows Eplorer, MC, Total Commander etc.) to a directory under 'src'dir in your project's directory. Then you have 2 options how to add icon to a midlet
  • you can specify an icon when you create a new midlet by New File wizard (File > New File > MIDP)

  • open project properties ( File > YourProjectName Properties ) and select 'Application Descriptor > MIDlets', select the midlet in right pane and push 'Edit ...' button. Then you can select an icon form icons in the project.


When you will do all the steps above you can finish with a midlet suite looking like this one

You can download the project in zip file or upload the jar/jad to your phone - it is MIDP1.0, CLDC1.0
Comments:

There was a question what should be the size of the icons. There isn't simple answer because it differs device to device. The size of display is different on different devices. One has to try or get appropriate information from device vendor.

Posted by Lukas on May 27, 2005 at 03:22 AM CEST #

Hi Lukas:
I am a naive user of NetBeans and J2ME (MIDP). I was tinkering with some sample codes and writing down my own too, when I stuck at the MIDlet icons.

Well your blog-post helped and I managed to set the icons of my own MIDlet on the fly. Thanks. I appreciate the way you are helping other fellows. The Flash demo app for the DateTime was also informative and eye-catching.

However, I would like to draw your attention to one matter - in the description of the icons problem you have written "... add your icons, images to a directory in your project..." and by looking at the sample code (downloadable from your blog-page only) anyone can get confused that this icons folder should be placed in "MidletsWithIcons\\build\\compiled" folder (as it shows after I decompressed the sample/demo after downloading it). Perhaps you should have mentined somewhere that this folder should be placed in "MidletsWithIcons\\src" folder. This will definitely save several minutes a reader may invest in placing the folder under different locations.

Last but not least, your blog is excellent. Keep writing.

Bye,
Krishna.

Posted by Krishna Kumar Khatri on January 04, 2006 at 08:31 PM CET #

thank you for so nice words.

There are icons in directory icons in src in the MidletWithIcons project. Anyway I will notice it in the blog entry exactly.

Posted by Lukas on January 05, 2006 at 04:02 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is the main channel to share news, tips and other stuff related to my work. Sometimes you can find even personal stuff. Enjoy your reading...

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
news
Blogroll

No bookmarks in folder

OldNews
MyTrash
NavBar
NetBeans
LinksToBeExpanded