This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hello guys there are many source code to paint image in jpanel but this time im trying to do this code like for example
i have a JPanel jpanel1 = new JPanel();
and i want to paint method link this code
here is my code.
"Graphics graphics = " is my big problem how to draw image using this code? thanks in advance.
Unless of course, you want the image to be scaled to a certain size, which could be one interpretation of your rather vague post. IMO that's better achieved by extending ImageIcon than by custom painting.
Why don't you go through the entire Swing tutorial trail? Programming is so much more fun when you understand what you're doing.
Joined: Jul 13, 2011
Sorry but how does layoutmanager help to fit the image? is that by setting the layout of jlabel?
see my code but it does not work
and i also try to do like this
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: jpanel paint image using method like jpanel1.paint