rickyman35
asked on
add image to JPanel
I dont know much about java but I need this answer fast. Whats the simplest way to add a picture to java?
public class pff extends JPanel
{
public void paint(Graphics g)
{
g.setColor(Color.BLUE);
g.fillOval(X, Y, 25, 25);
}
}
I've got something like that, I want to be able to change the oval to a picture on my hard drive, how do I do that?
public class pff extends JPanel
{
public void paint(Graphics g)
{
g.setColor(Color.BLUE);
g.fillOval(X, Y, 25, 25);
}
}
I've got something like that, I want to be able to change the oval to a picture on my hard drive, how do I do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> I cant get it to show up, I add it to the paint method but nothing shows up.
What layout did you use on the container?
What layout did you use on the container?
Please split.
;JOOP!
;JOOP!
Opps... Sorry I meant to do a split only between CEJH and sciuriware, moderator please correct.
Regards
Regards
no problem.
:))
ASKER