Help me creating GUI with event | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Help me creating GUI with event

background color panel as black when the mouse is pressed and white as when the mouse is released

18th May 2020, 2:45 PM
Alke Mist
Alke Mist - avatar
2 Answers
0
Hello Alke Mist Which framework are you using? Swing or JavaFX? And which object should get this mouse event?
18th May 2020, 4:37 PM
Denise Roßberg
Denise Roßberg - avatar
0
create a class that implements MouserListener, there Override all abatracts methods.
18th May 2020, 5:43 PM
Jobemar Arreaza
Jobemar Arreaza - avatar