Course Solutions Uncategorized (Solved) : Change Sceneeditor Application Sceneshape Object Selected State Drawn Dashed Blue Rectangl Q35999532 . . . .

(Solved) : Change Sceneeditor Application Sceneshape Object Selected State Drawn Dashed Blue Rectangl Q35999532 . . . .

 

Change the SceneEditor application such that a SceneShape objectin selected state is drawn with a dashed blue rectangle around it,with small blue squares (side size=6 pixels) marking thecorners.
A screenshot how it should look is:

House Car Remove

Hints:
You may use method GeneralPath.getBounds2D() to get the enclosingrectangle.
Use method Graphics2D.setStroke(Stroke s) with a BasicStrokeparameter.

The Code given below:

//CarShape.java

import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

/**
* A car shape.
*/
class CarShape extends CompoundShape
{
/**
* Constructs a car shape.
*
* @param x the left of the bounding rectangle
* @param y the top of the bounding rectangle
* @param width the width of the bounding rectangle
*/
CarShape(int x, int y, int width)
{
Rectangle2D.Double

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post