Sun Apr 17, 2011 5:28 pm
Mon Apr 18, 2011 11:55 pm
Thu Apr 21, 2011 3:18 am
msi_333 wrote:what about progress bar .
or you want only to have image while loading something .
Mon Apr 25, 2011 3:15 am
Mon Apr 25, 2011 2:50 pm
JProgressBar progessObj = new JProgressBar();
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JFrame;
public class FrameImage extends JFrame {
public FrameImage(){
setSize(500,500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
}
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
Image img1 = Toolkit.getDefaultToolkit().getImage("image.gif");
// draw the image at postion 0,0
g2.drawImage(img1, 0, 0, this);
g2.finalize();
}
}
Mon Apr 25, 2011 4:34 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.