I tested this code in order to create dialog with image.
final int xSize = 400; final int ySize = 280; final Color backgroundColor = Color.WHITE; final Strin
copy and paste the image into folder where source package(source packages in NetBeans IDE) is present. Then
Image image = new Image("a1.jpg"); Image image = new Image("File:a1.jpg");
both will work.