1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elan Coil [88]
3 years ago
6

Consider the following Java program. Describe what it does in response to specific operations of the mouse, and how it does it.

(You are encouraged to run the program for yourself to test its behavior. Then read through the program carefully to understand how that behavior arises.)
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(); }
}
Computers and Technology
1 answer:
Stels [109]3 years ago
8 0

Answer:

Explanation:

This java code creates a windowed java application that is 300x100 pixels large. The title of the program which is located in the bar at the top of the program starts off by saying "Come Closer". If you move the mouse over the program the program detects it. Then if you press the program it changes the title to "Let Go". If you press the program and immediately let go it changes the title to "Ouch" but if you hold for 1 or 2 seconds and let go it changes the title to "Whew". Finally, if you move the mouse cursor away from the program it changes the title back to "Come Closer"

You might be interested in
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
Studentka2010 [4]

Answer:

to find a answer in brainly

7 0
2 years ago
Read 2 more answers
This software application can be used to organize, analyze, and illustrate data?
valkas [14]

Answer:

Excel

Explanation:

Excel is a program by Microsoft that allows the user to create and organize data in tables in graphs.

Word is a documentation program by Microsoft that allows the user to create a written document with images, graphs, etc. But it is not used to organize data.

PowerPoint is a program by Microsoft that allows the user to create and display presentations.

Outlook is a program by Microsoft the allows the user to email other users' and emails along with other emails in general.

7 0
3 years ago
Read 2 more answers
Which statement relating to a Works Cited page is NOT True?
oksano4ka [1.4K]
The incorrect answer is the second one: It is the first page in a research paper.
Works cited pages always come last.
7 0
4 years ago
Read 2 more answers
Gave me six external part of the computer system and identify which is the output and input devices
Mariana [72]
1. monitor output
2. keyboard input
3. mouse input
4. <span>microphone input</span>
5. printer output , or input if it has scanner
<span>6. speakers output</span>
5 0
3 years ago
What are workplace human relations
snow_lady [41]

Answer:

Relationships between employees and management are of substantial value in any workplace. Human relations is the process of training employees, addressing their needs, fostering a workplace culture and resolving conflicts between different employees or between employees and management.

3 0
3 years ago
Other questions:
  • In the context of prototyping during the design phase of the systems development life cycle (SDLC), a _____ prototype shows user
    14·1 answer
  • Quantas calorias os adolescentes devem consumir diariamente?
    14·1 answer
  • In Java please.
    13·1 answer
  • Create and Provide complete program that includes a comments header with your name, course, section and other program details an
    9·1 answer
  • Is 583 a string or a number?
    13·2 answers
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    6·1 answer
  • Why is it important to ensure that DNS Servers have been secured before implementing an e-mail system
    7·1 answer
  • Write a program that computes how much each person in a group needs to pay (after tax and tip) when splitting the bill equally.
    5·1 answer
  • Marly is using her smartphone to review a webpage she created. The formatting and alignment of webpage elements is incorrect. Wh
    7·1 answer
  • Which best describes sorting, filtering, and deleting records?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!