Question: Write a Java program that displays in a frame a movable cross-hair made up of one horizontal line and one vertical line joining the left-right

Write a Java program that displays in a frame a movable cross-hair made up of one horizontal line and one vertical line joining the left-right and topbottom edges. The cross-hair should follow the mouse, such that the two lines intersect at the cursors position. Whenever the mouse button is pressed, the X-Y coordinates of the cursor position should be displayed near the cross point, either left or right, above or below, as necessary.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!