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.

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

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.

1.3 or 1.4 allowed for png format as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.