Hi, frend:
I need to draw an image in a Panel as Panel background. Can any body help me?
I use awt.
Thank you very much.
Printable View
Hi, frend:
I need to draw an image in a Panel as Panel background. Can any body help me?
I use awt.
Thank you very much.
You can create sublclass of Panel class and override its paint() method, like:
public class MyPanel extends java.awt.Panel
{
public void paint(Graphics gr)
{
// any graphics operations, for example:
gr.drawLine(...);
}
}
After that you have to use instance of your MyPanel class in your application.