954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Loading images

hi,
i am doing a project on steganography,and here ,i've gotta browse and then display images in the window.i dont know how to get the image as it is an application and not an applet.hence,i cant use getImage().plz help me.

cuckoo
Newbie Poster
2 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

hi everyone,

Put a JLabel on your window.
try this

ImageIcon i = new ImageIcon("file");
JLabel l = new JLabel(i);

To change the image during runtime have an option that can
reload a new image and repaint the label and window

The ImageIcon class has functions to set the image
See Java's Image Icon class for a more detailed description

I hope this helps you

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

i tried with the imageicon but i guess image icon works only for .gif and .jpg.anyways,4get abt it,as i have an even more difficult problm.i have been given the c code of steganographyand i'm supposed to convert it to java.it has many pointers and fseek functions.i'll giv the code,could u help me out converting to java.

could i send u through my yahoo account ,plz it is very important.plz
it is actually a zipped file.

cuckoo
Newbie Poster
2 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

1.3 or 1.4 allowed for png format as well.

Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You