COMP274 Week 5 Homework – Guaranteed 100% score

Lab Price = $10
Please feel free to send us your queries at:
Payment Methods

Add to Cart

View Cart

Problem Statement

Answer the following questions:

1. Describe the graphical coordinate system in Java. Where is the origin? What units apply to the x,y coordinates?

2. How would you use the Graphics class to draw a line between 2 specific points? Give an example.

3. How do you specify a particular color to be used as fill when using the Graphics class?

4. How would you create a SanSerif font of point size 14 that is bold and italic? Give an example.

5. Given a graphics object g, write a few lines of code to have that graphics object draw a green circle (filled in) that has a diameter of 100 pixels.

6. Given a graphics object g, write a few lines of code to draw a red rectangle (not filled in) with its upper left corner at position 25, 25 with a width of 100 and a height of 50.

7. What is the paintComponent method? How is it used in Java graphics? How does a program intentionally cause the paintComponent method to execute?

8. What does invoking the base class paintComponent method accomplish?

9. What window events can a program handle? Explain the difference between the WindowListener interface and the WindowAdapter.

10. What interface does an application need to use if it wants to get updates on the current position of the mouse cursor? How does the program get the x,y coordinates of the mouse cursor?
11. Write a few lines of code to create a timer in Java which fires an ActionEvent every 250 msec. Assume the existence of a TimerHdlr class which needs to respond to timer events.

12. Describe the types of information available to a program when using the KeyListener interface.

Relevant Material
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details


Lab Price = $10
Please feel free to send us your queries at:
Payment Methods

Add to Cart

View Cart

Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.

Leave a Reply