What is the createImage() method?
What is the createImage() method?
Rating:
The createImage() method is used to display an immutable image by creating an instance of the Image class. This method takes one parameter, i.e., the name of the file having the image. The syntax below creates an instance of the Image class:
The instance is created using the constructor of the ImageItem syntax below:
The ImageItem constructor takes four parameters. The first parameter is the label that displays the text with the image. Here, it is image.
The second parameter takes the instance of the Image class.
The third parameter takes one of the ImageItem constants that define the layout of the image.
The fourth parameter takes a text, which is displayed if the image is not available.
Rating:
Other articles
- What is a record store?
- What is the Alert class?
- What is the destroyApp() method?
- What is the sleep() method?
- What is the registerAlarm() method?