Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question: Enhance the drawer6 package in the following ways:

a. Add "Delete," "Cut," "Copy," and "Paste" menu items to the Edit menu in the drawer6 package. The Delete menu item removes the selected figures from the canvas. The Copy menu item creates copies of the currently selected figures and puts them in a clipboard for later pasting. Cut is just like Copy except it deletes the currently selected figures after copying them. The Paste menu item should take the figures in the clipboard and paste them down and to the right a few pixels from where the original figures were at the time they were copied. Ideally you will use the system clipboard so that copied figures can also be pasted into other applications if they support such pasting. To get the system clipboard using Java, have your Drawing Canvas class call

getToolkit().getSystemClipboard()

b. Implement resizing. To do so, add a new "Resize" tool. When the user selects the resize tool and drags one of the corner (light green) boxes on a selected figure, that figure is stretched with the dragging. The corner of the selected figure opposite to the dragged corner remains fixed.

c. Add context menus. That is, when the user right clicks on a figure using the selection tool, that figure is and a popup menu appears with appropriate options for the type of figure selected.

For this exercise, the popup menu should just have a "Delete" menu item unless the selected figure is a Group Figure, in which case there should also be an "Ungroup" menu item.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92593542

Have any Question?


Related Questions in Computer Engineering

Can someone help me with traceroute of massachusettsnbspuse

Can someone help me with traceroute of massachusetts  Use traceroute to trace the route from your home or work computer to your university's website. Show the traceroute output. What networks were encountered along the w ...

Write a program to calculate the average temperature for

Write a program to calculate the average temperature for the year and determine the hottest month of the year. In your main method, the program should collect the user input of the average Fahrenheit temperatures for eac ...

Request this to be done in jgrasp1 add a method to the

Request this to be done in JGrasp 1. Add a method to the program that calculates the cube of every number between a lower bound and an upper bound that a user inputs (for instance, lower bound 1 and upper bound 9, for be ...

Question what is the smallest value of n such that an

Question : What is the smallest value of n such that an algorithm whose running time is 1000n 2 runs faster than an algorithm whose running time is 4 n & on the same machine? Justify your answer. The response must be typ ...

Research pythons dictionary data type dict discuss its

Research Python's dictionary data type (dict). Discuss its interface and usage. Include examples. Discuss practical applications of dictionaries. And also Discuss the concepts and purpose of hashing. Include examples of ...

Sometimes when we visit super markets we may share our

Sometimes when we visit super markets, we may share our personal details to get (for example) "Loyalty cards" and other benefits. Do you think sharing such details is a good approach? Give arguments for both cases: "shar ...

Ellen is an anthropologist who has been working at olduvai

Ellen is an anthropologist who has been working at Olduvai Gorge in Tanzania for the past six months. She has been conducting research on the Internet. She finds a Web site with an article that proposes a revolutionary t ...

From a security standpoint do you believe the apple

From a security standpoint, do you believe the Apple approach of hiding permissions or the Android approach of requiring the user to accept application permissions is a better approach? Why do you feel this way and do yo ...

A new machine averages 4 clock cycles per instruction and

A new machine averages 4 clock cycles per instruction, and runs at a system clock of 20 MHz. The Axiom-Verge algorithm set to benchmark the system will take an even 3000 instructions to complete. a) Knowing how many cloc ...

Suppose you have the new zarnex vq-120 computer which has a

Suppose you have the new Zarnex VQ-120 computer which has a 64-bit architecture. Further, the boss has told you to ‘‘max out the memory,'' which, on that machine, means you can install all the memory the architecture sup ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As