Erinevus lehekülje "ITI0011:praktikum 9 N14" redaktsioonide vahel
Mine navigeerimisribale
Mine otsikasti
(Uus lehekülg: 'Tagasi ITI0011 lehele. == Üldine == Praktikum: 30.10.2014 kell 14:00 Teemad: * JavaFX * JavaFX klassi arvutites ** https://courses.cs.ttu.ee/pages/ITI0011:JavaFX#JavaFX_k...') |
(Erinevus puudub)
|
Redaktsioon: 30. oktoober 2014, kell 11:59
Tagasi ITI0011 lehele.
Üldine
Praktikum: 30.10.2014 kell 14:00
Teemad:
- JavaFX
- JavaFX klassi arvutites
- Layout, Pane
- Shapes
- mouse event
Koodinäite
Exercise
Create an application which allows the user to draw a rectangle. There are several options how to achieve this:
- using mouse dragging: the starting point is fixed when the dragging starts (mouse press), the opposite corner moves along while dragging. if the dragging ends, the rectangle is fixed.
- using clicking: when clicking first time, one point is fixed, when clicking another time, the opposite corner is fixed (and rectangle is drawn).
- some other way
Optional requirements:
- more than one rectangle can be drawn