subject

Consider the following Java program. Which one of the following is an interface?

import java. awt. event\.\*;
import javax. swing\.\*;
public class MouseWhisperer extends JFrame implements MouseListener {
MouseWhisperer() {
super("COME CLOSER");
setSize(300,100);
setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE);
addMouseListener(this);
setVisible(true);
}
public void mouseClicked(MouseEvent e) { setTitle("OUCH"); }
public void mousePressed(MouseEvent e) { setTitle("LET GO"); }
public void mouseReleased(MouseEvent e) { setTitle("WHEW"); }
public void mouseEntered(MouseEvent e) { setTitle("I SEE YOU"); }
public void mouseExited(MouseEvent e) { setTitle("COME CLOSER"); }
public static void main(String[] args) { new MouseWhisperer(); }
}

Select one:

a) addMouseListener(this);
b) public class MouseWhisperer extends JFrame implements MouseListener {
c) public static void main(String[] args) { new MouseWhisperer(); }
d) public void mouseEntered(MouseEvent e) { setTitle("I SEE YOU"); }
e) setVisible(true);

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:00, mimithurmond03
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, cheycheybabygirl01
How can the temperature of a room be raised by 5degreesf?
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, sierranowe2003
7. test average and grade write a program that asks the user to enter five test scores. the program should display a letter grade for each score and the average test score. write the following methods in the program: calcaverage: this method should accept five test scores as arguments and return the average of the scores. determinegrade: this method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale: score letter grade 90-100 a 80-89 b 70-79 c 60-69 d below 60 f
Answers: 1
image
Computers and Technology, 25.06.2019 17:00, lolololol21
Ineed on this it's not really a subject it's drivers edd
Answers: 1
You know the right answer?
Consider the following Java program. Which one of the following is an interface?

import...

Questions in other subjects:

Konu
English, 25.03.2021 02:10