Adding a MouseListener to a panel

前端 未结 5 1792
轻奢々
轻奢々 2021-01-29 07:10

I am trying to add the mouse actions to my panel. This is what the program is supposed to do:

Write a program that allows the user to specify a triangle

5条回答
  •  感动是毒
    2021-01-29 07:33

    I'm not super familiar with Swing. As a new programmer, I've only worked with JavaFX.

    However you have no reference to the MouseListener anywhere in your program. You probably forget to instantiate it.

提交回复
热议问题