Skip to content
Advertisement

Displaying Image in Java

I want to display an image but don’t know what to do. Whether I have to install some library files or simply it can be done I don’t know. Actually I want to do image processing, but first I have to take the image input and display image then I can get the effect of image processing as the output and decide whether it(algorithm) is correct or not. I have installed the eclipse only. I have searched in Google also but whatever they suggest is not working well. Either I have to install something or not.

I have tried the following code:

JavaScript

It simply shows a graphical window but can’t show the image “bishnu.jpg”

Should I install anything in eclipse? But I think nothing needs to install.

Advertisement

Answer

Running your code shows an image for me, after adjusting the path. Can you verify that your image path is correct, try absolute path for instance?

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement