logo

Crowdly

Mis värvi on ring, kui klikkida sellele kolm korda? Circle ring = new Circle(5...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Mis värvi on ring, kui klikkida sellele kolm korda?

Circle ring = new Circle(50, Color.RED);

kiht1.getChildren().add(ring);

kiht1.addEventFilter(MouseEvent.ANY, event -> event.consume());

ring.setOnMouseClicked(event -> {

if (ring.getFill() == Color.RED)

ring.setFill(Color.BLUE);

else

ring.setFill(Color.YELLOW);

});
0%
More questions like this

Want instant access to all verified answers on moodle.ut.ee?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!