Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Beginning with the file that you downloaded named Proj 0 8 . java, make a file named Proj 0 8 Runner.java to meet the specifications
Beginning with the file that you downloaded named Projjava, make a file named ProjRunner.java to meet the specifications given below.
Note that you must not modify the code in the file named Projjava.
Projjava
File Projjava
The purpose of this assignment is to assess the student's
ability to make a program dealing with Frame objects,
MouseMoved events, MouseDragged events, and the Delegation
Event Model.
import java.awt.Frame;
public class Proj
public static void mainString args
Frame aFrame new ProjRunner;
end main
end class Proj
Be sure to display your name in both locations in the output as indicated.
When you place both files in the same folder, compile them both, and run the file named Projjava, the program must display the text shown below on the command line screen.
I certify that this program is my own work and is not the work of others. I agree not to share my solution with others. Replace this line with your name
In addition, your program must display a single pixel by pixel Frame object as shown in the image below in the upperleft corner of the screen.
When you move your mouse pointer around inside the client area of the frame, without pressing either mouse button, the coordinates of the mouse pointer must appear directly above and to the right of the tip of the pointer. In this case, the coordinates are displayed using black characters. Old coordinates must be erased before new coordinates are displayed.
When you move your mouse pointer around inside the client area of the frame, while pressing either mouse button, the coordinates of the mouse pointer are displayed in the same manner using red characters.
If you slowly move the mouse pointer off the left side of the Frame, the coordinate values should freeze with the xcoordinate value being approximately equal to the width of the left border of the Frame. That value might be as low as but should never be and probably should not be as low as or Depending on the Java version and the operating system, it may be much higher. Right now, the lowest value being reported on my computer is
If you slowly move the mouse pointer off the bottom of the Frame, the coordinate values should freeze with the ycoordinate value being approximately equal to minus the width of the bottom border of the Frame. That value should never be and probably should never be greater than Depending on the Java version and the operating system, it may be much lower. Right now, the maximum value being reported on my computer is
If you aren't getting similar results, please discuss the matter with your instructor before you submit the assignment.
When you click the X button the rightmost button in the group of buttons in the upperright corner of the Frame object the program must terminate and MUST RETURN CONTROL TO THE OPERATING SYSTEM.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started