|
-
Aug 28th, 2003, 07:55 PM
#1
Thread Starter
Fanatic Member
Load a img and mouse click (X and Y)
I am new to JAVA. How can I load a picture in an applet, click on a button on that image and then a second pic loads up??
Help appreciated
John
-
Aug 29th, 2003, 02:56 AM
#2
I believe the Applet class has a function called "getImage" or something.
But what do you mean by a "button on that image"?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 29th, 2003, 08:31 AM
#3
Thread Starter
Fanatic Member
Lets say for example the image contains a OK button. On want the user to click on the x and y position of the button image on the image...
-
Aug 30th, 2003, 04:10 AM
#4
Do you know the position and size of the button? If so, you only need a MouseListener on the applet and see if any mouse clicks occur within the button area. If they do, do something.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 31st, 2003, 05:23 PM
#5
Thread Starter
Fanatic Member
Lets say we have a IMAGE of a message box and we want the user to click on the OK button (only an image, not an actual button)... how do we determine the x and y of the button on the image?
-
Sep 1st, 2003, 01:36 AM
#6
You can't unless you do a color scan which might not be reliable.
Better if you just know where it is.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|