How to print image on applet
import java.awt.*;
import javax.swing.*;
hi i just started with java 2 days ago. and i cant seem to print image on applet.
there are no errors so i am guess problem is in imageIcon path?
public class IMAGE extends JApplet
{
ImageIcon yanks;
public void init()
{
yanks = new ImageIcon("C:\\Users\\dva\\Pictures\\JAVAIMAGES\\c h1.png");
}
public void paint(Graphics g)
{
yanks.paintIcon(this, g, 100, 100);
}
}
Re: How to print image on applet??????????????????????????????????????????? this is n
Not sure if I should reply as I don't know if you've read my reply in your previous question.
Re: How to print image on applet??????????????????????????????????????????? this is n
i did read ur post and i know what is wrong but i dont know how to fix it.
Re: How to print image on applet
Posting a thread title with 30+ questions marks is bound to annoy more than one person. For everyone's benefit I have removed them from your title, and I would recommend refraining from doing so again, and as curmudgeon alluded to acknowledge the advice you receive, and if you are still confused ask a specific question in response.
In reply to your question, here are two tutorials I recommend reading to learn how to accomplish what you want:
How to Use Labels (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
Trail: 2D Graphics (The Java™ Tutorials)
Re: How to print image on applet??????????????????????????????????????????? this is n
Quote:
Originally Posted by
hwoarang69
i did read ur post and i know what is wrong but i dont know how to fix it.
Then kindly reply to my post in your other thread with your specific questions. If you ignore it, we won't know if you'll ignore posts in your other questions as well, and this may demotivate folks from replying to you.
Re: How to print image on applet
chill out!!!!!!
today is my first day on a coding form website. i trying to figure it out as i go on.
and about the code problem, i just found out what i was doing wrong but thanks any way.
Re: How to print image on applet
I'm calm, but I just wanted to point out that in general you'll want to reply to replies in previous threads before asking new questions. We're all volunteers and we like to see acknowledgement that our suggestions have been read. That's really not asking too much of you , is it?