Friday 25 May 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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...