A BitmapField
is another display-only field that shows, you guessed it, a bitmap image. You can use your own image or one of the stock images in the system. Also, just because the name is BitmapField
doesn't mean that you have to use BMP files. In fact, the JDE doesn't support BMP files at all. The JDE supports only JPG, GIF, or PNG files. PNG files are actually preferred though, simply because they are typically much smaller in size than the other formats. We'll show how to use both using the Bitmap
class.
The first step to using a BitmapField
is to create the Bitmap
object. The operating system comes with several stock images that are used in operating system functions already. They are identified not by filenames, but by special constant values in the Bitmap
class such as INFORMATION, WARNING
, and ERROR. Bitmap
objects can be created to use these predefined images using the static method getPredefinedBitmap
. Most of the time you use these constants when creating dialogs...