sparafucile17
Programmer
Can anyone give me a quick couple lines of code for adding a JPEG image to JPanel? I need to put a comany logo in my JPanel, but can't find any definitive way to do it. I got as far as creating a Toolkit and opening and Image from it. But now how to I place it on the panel? Currently the whole panel is laid out using x-y coordinates, so merely placing it "North" or "South" doesn't do me any good.
I really need a way to place it using x-y coordinates and to make it visible.
Is using a Toolkit and Image the right way to add a JPEG? Am I on the right track?
All suggestions are welcome.
I really need a way to place it using x-y coordinates and to make it visible.
Is using a Toolkit and Image the right way to add a JPEG? Am I on the right track?
All suggestions are welcome.