I created Ellipse using java.awt.geom.Ellipse2D
Now I want that whenever a user clicks on this ellipse, an event is created so that I can listen to this event and form subsequent tasks based on the ellipse that generated this event.
Here is a simple example of an object drawing program that demonstrates clicking, dragging, and multiple selection. Also consider JGraph , which is a much more complex library for graph visualization.
, ( - , ).
, . , .
:
: https://scenegraph.dev.java.net/ google : scenegraph java . Scenegraph JavaFX, Java ( FX)
, , , , - Swing, Graphics2D.draw.
Graphics2D.draw
, , .
Ellipse2D
List
MouseListener
MouseEvent
MouseEvent.getPoint
Ellipse2D.contains
Source: https://habr.com/ru/post/1727615/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1727610/android-handover-sms-to-default-application&usg=ALkJrhjf2WosJxbxYSQkLalBgPNBJA_xmAXBAP Select Page Text - wpfHow should I accidentally call class methods? - c ++How to send mail through mailx & subprcoess? - pythonCan we execute a script file with a database using free Nhibernate? - fluent-nhibernateVisual Studio VB Virtualization Settings - editorjavascript XSL в Google Chrome - javascriptGiven a column name, how can I find which tables in the database contain this column? - sqlgoogle gears discontinued, html 5 in draft - html5.NET MVC: how to implement a different page appearance for each user? - cssAll Articles