25.4.3 Adding an Image to the Project

One way to use an image in your app is to add its file to the project, then display it on an ImageView. The bug.png image you’ll use for this app is located in the images subfolder of this chapter’s examples folder. Locate the images folder on your file system, then drag bug.png onto the project’s <default package> node to add the file to the project.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.