How do you make text in a frame change dependent on cursor position?
问题 I have a program that is basically just supposed to change the text of a label when your cursor enters a polygon that is shown on the JPanel . I have tried a few different things with nothing working. Currently I am trying an if statement to make it choose which button to add but it still doesn't change if i move my cursor into the polygon. when the cursor is outside of the polygon the label should say "point is not in the polygon" and when inside it should say "point is in the polygon". Any