Should I create a folder Images in netbeans


I am developing a java application in netbeans, to save image icons, should i create a new images folder or there is already an images folder created?

I have created an image folder in the project, to set an image icon to JFrame,

URL iconURL = this.getClass().getResource("images/images.jpg");

    ImageIcon icon = new ImageIcon(iconURL);


Uncaught error fetching image:
at sun.awt.image.URLImageSource.getConnection(
at sun.awt.image.URLImageSource.getDecoder(
at sun.awt.image.InputStreamImageSource.doFetch(
at sun.awt.image.ImageFetcher.fetchloop(

Regardless of whether you have a directory created, I suspect this


is a problem and you should specify the resource path as images/images.jpg (i.e. a forward slash, regardless of the platform. The slash is a resource separator and not necessarily referring to the filesystem)

I wouldn't expect NetBeans to do anything for you without an explicit request, and as such you should create whatever folders/resources you need.