This example MIDlet shows you how to create a simple touch-based paint application. The MIDlet allows the user to draw on the screen, change the brush size and color, clear the screen, and save the drawn image in the BMP file format to the default photo folder.
Figure: Paint MIDlet running on a Series 40 full touch device
For a tutorial that shows you how to create this MIDlet, see section Example: Drawing with Paint.
This MIDlet is provided in two versions:
The regular version is compatible with Series 40 6th Edition Feature Pack 1 devices and newer.
The Series 40 full touch version is compatible with Series 40 6th Edition Feature Pack 1 devices and newer, but the Series 40 full touch features are only available on Series 40 full touch devices with Java Runtime 2.0.0 for Series 40 or newer.
This MIDlet has been tested on the following device:
Nokia Asha 305 on Nokia Asha software platform (Java Runtime 2.0.0 for Series 40)
Nokia Asha 306 on Nokia Asha software platform (Java Runtime 2.0.0 for Series 40)
Nokia Asha 311 on Nokia Asha software platform (Java Runtime 2.0.0 for Series 40)
Nokia X3-02 (Series 40 6th Edition Feature Pack 1)
The MIDlet project files are packaged as a zip file. The zip file includes two projects: the regular version and the Series 40 full touch version. To download the zip file, click the following link:
For possible newer version, other updates or additional documentation, check the Paint at Nokia Developer Projects.
The MIDlet consists of the following packages and classes (click to view the full source code):
Note: The source code is from the Series 40 full touch version of the MIDlet. To view the source code of the regular version, see the source code files in the zip file.
com.nokia.example.paint
com.nokia.example.paint.helpers
com.nokia.example.paint.touch
com.nokia.example.paint.views
com.nokia.example.paint.views.components