Friday, May 25, 2018

java - How do you add an image to a JPanel

I am trying to display a jpeg image to a panel in a JPanel. I have two panels panel, and panel1. I'm trying to display the image in one panel and then remove the panel to display another.



       panel.g2d.drawImage(myimage, 0, 0, null);


It gives me about 50 errors and I can't type them all because I'm writing this on my phone because I don't have Internet right now.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...