adding icon to your MIDlet

Page content

Hello, this topic is also not very complicated, so the post will be quite short.
We have to remember about some rules before we add icon to a MIDlet:

  • Only PNG’s are allowed
  • icon’s size is not standarized
  • some phones will expand smaller icons, some won’t
  • the icons that are to big might be shrinked or cut to smaller, we can’t decide
  • I recommend using size 32x32, it is smaller than most phones can hold, so at least we can be sure, that it won’t be cut
  • icon files, if we want to reffer to it as: “/icon.png” should be placed in src directory in project’s path I think it’s the best way to do this (this file will be automatically added to newly created JAR file)
  • After starting Netbeans we go as before to project’s properties, here we open “Application Descriptor” again, then we select second tab:
  • Now, after choosing “Edit…” we can select file:
  • Next, we have to add appropriate attribute to our JAD and manifest. Let’s click “Add…”, automatically first to add will be icon attribute:
  • At last you can run this MIDlet in the emulator (or upload to your mobile). You should see icon you have selected for your app.
  • Easy to use program for converting other graphics formats to PNG can be downloaded here:
  • You should find/create icon by yourself, for tesing I used RSS icon.