I'm confuse on these questions, I was just wondering if anyone see if I'm doing them right.
If you want to create an effect like a rubber-band line, which changes continually with user input, you will most likely need a (an) A. MouseListener B. ActionListener C. MouseAdapter D. MouseMotionListener E. KeyListener
I think the answer is action listener because what ever the object is observing generate a action event.
Suppose a programmer creates a Java class named MyFrame which extends JFrame. Class MyFrame contains a single constructor whose body is empty. If an object of type MyFrame is created and made visible (but no other methods in the object are invoked), then when the user clicks on the “X” in the upper right corner of the window (frame),
A. the program will terminate
B. the window will be hidden but will still exist
C. the window will be closed
D. the window will be minimized (“iconified”)
E. the question cannot be answered because such a class cannot be compiled
F. the answer cannot be determined from the information given
Assuming I understood the questions right. So the class MyFram extends to JFrame. And my class MyFrame { } constructor is empty. I think it B, because it will compile, but may not doing any form of action assuming nothing is invoked at all.