+ 10
can we add any image in java program ?
think i want to add a image in java program like those done in html by <img> tag. Is their any syntax for addition of image in java.
4 Answers
+ 7
Before adding u need to have a GUI (like JFrame).
Then add the image with a JLabel
YOURGUI.add(new JLabel(new ImageIcon("PATH_TO_IMG")));
+ 11
For this, u need to use any graphic library of java.
+ 2
suman Kayal
Use an IDE like NetBeans, Eclipse in ur PC.
It is quite possible to add pics in Java .
U need a GUI platform for example JFrame, JPanel etc... For this u need a IDE
Download NetBeans or Eclipse
+ 1
you need a GUI like swing to add an image, using JLabel, you can add icon on it and resize