________________ listener to the component, and 2) you must use the
_________________ method in a mouse listener to request the focus.
Rectangle rect; String label;Write a paintComponent method that accomplishes the following tasks:
Here is some code to provide you context:
class Counter extends JPanel { Rectangle rect; String label; // you may need to declare additional instance variables here public Counter(Rectangle r, String l) { rect = r; label = l; // put your counting code here