Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java JPanel questions How do you draw multiple line and square in one JPanel? how do you keep track on that x and y value

Java JPanel questions

How do you draw multiple line and square in one JPanel?

how do you keep track on that x and y value (Starting x and y value, end x and y value) when the mouse listener get call every time?

and how do you make this class implement an action listener. Please if you could explain to me what to do in the code.

In the code it should be able to draw multiple line and square with any size that mouselistener get from user, also it has to have one reset button that clear everything in jpanel.

they said have to override the paintComponent() but how do i do that? can you please give example either square or line.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago