|
-
March 3rd, 2000, 12:29 PM
#1
draw image
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.
-
March 3rd, 2000, 08:08 PM
#2
Re: draw image
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|