Meaningless Drivel is fun!
The moose likes Applets and the fly likes image and buttons in applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "image and buttons in applet" Watch "image and buttons in applet" New topic

image and buttons in applet


Joined: May 23, 2005
Posts: 5
I have got a question.
How can i get an image and two buttons for zooming the picture together in one applert I don't know how to programm this, because the paint() method only draw the image into the applet and no Buttons are available
Please help me
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199


Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. "Handles" and joke names aren't acceptable here. You can change your display name here. Thanks!

Second, please don't post the same question to multiple forums -- it just wastes people's time answering questions that have already been answered elsewhere. I've deleted the other copy of this question.

Finally, as to your question: you do painting in paint(), and you set up buttons and things in your init() method. You might do the drawing into a separate panel, and add this panel and the buttons all to the applet.

[Jess in Action][AskingGoodQuestions]

Joined: May 23, 2005
Posts: 5
thanks for your support
I agree. Here's the link:
subject: image and buttons in applet
It's not a secret anymore!