Solved

Very easy question + 200 points.

Posted on 2002-03-03
7
179 Views
Last Modified: 2011-09-20
Hi


I need to see an applet that does the following please:
display an image.
allows me to drag it up, down, left, and right.

I want you to identify which commands in the code that allows me to drag the image.
Thanks alot
0
Comment
Question by:aja101498
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Expert Comment

by:daitt
ID: 6838325
Sounds like a homework question.
Build an applet. In start() function, load the image. In paint(Graphics g) function, draw the image.
Catch mouseDown(MouseEvent e), mouseUp(MouseEvent e), mouseDragged(MouseEvent e) to change the coordinate of the image, and repaint.
If you have problem with any of the things below, please ask.
0
 

Author Comment

by:aja101498
ID: 6839247
No I am not student I am start learning Java and I couldn't find this in box.
All I want is to see an example. Thanks
0
 
LVL 3

Expert Comment

by:daitt
ID: 6840347
Please try to build the applet step by step. I think this is a good way to learn java.
1. Create an empty applet, test it.
2. Load the image (in init() function of the applet) and display it (in paint function of the applet). Test the applet.
3. Catch onMouseDown and onMouseDragged to move the image. Test the applet.
4. Catch onMouseExited to reset mouse status when user move out of the applet. Test the applet.

You can ask if you have any problem with the steps above.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Accepted Solution

by:
sanjay_thakur earned 200 total points
ID: 6840356
0
 
LVL 8

Expert Comment

by:Exceter
ID: 7384860
Pardon our critisism but you must understand that we have many students that attempt to get us to do their homework for them.
0
 
LVL 35

Expert Comment

by:girionis
ID: 8658254
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to sanjay_thakur

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to convert from xls to xlsx using java 7 85
servlet and mdb, jms error 1 56
Java Eclipse Loop 3 29
import as existing maven project 3 34
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question