|
-
May 13th, 2005, 03:09 PM
#1
Need Help With Applet
I have a java applet in which I must draw graphics (such as rectangles) and also place buttons. I am able to draw the graphics, but I do not know how to place the buttons. Can anyone help?
I am using the Graphics class in the paint method to draw the rectangles. Example:
Code:
public void paint(Graphics g)
{
g.drawRect(30, 30, 100, 100);
}
What classes/methods do I use to place buttons? And which classes to I need to import?
Thanks!
-
May 13th, 2005, 04:25 PM
#2
Re: Need Help With Applet
I suggest you have a read of this tutorial from Sun. It begins to describe how you can add AWT components (such as buttons) onto your applet.
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
|