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
Yuri [45]
3 years ago
6

In processing, how do you make a line's end points move up and down when a certain button is pressed, like it makes a smile then

goes back to a horizontal line, repeatedly?
Computers and Technology
1 answer:
Viefleur [7K]3 years ago
6 0
This is called event driven programming. When a button is pressed, mouse moved or clicked or something happens, the event is caught by the main loop of the desktop GUI (Graphical User Interface) and passed to the main loop of your GUI program. Your program, if it's interested in this event (by registering this event with the desktop GUI), executes an event handler function which is called with the parameters of the event (mouse location, which key was pressed). In your case, the mouse-down event might trigger a function that draws a curved (smiley) line, and the mouse-up event might draw a straight line.
You might be interested in
Why shouldn't a server use a glass to scoop ice?
natali 33 [55]
A server shouldn't use a glass to scoop ice as the glass may break. This is due to the potential temperature difference between the glass (which may be room temperature or hotter if it is taken from a dishwasher), and the cold ice. Any existent hairline fractures in the glass may then expand and crack, whereby the smashed pieces of glass could then land in the client's food, table or lap, potentially causing injury to the person. 
7 0
4 years ago
Read 2 more answers
How did the tropica cyclone impact the environment​
Vilka [71]
Island dim disk disk dim sum
6 0
3 years ago
How does outlets generate electricity???
dimaraw [331]

Answer:

"a hole is connected to the wire that brings the electricity back to the breaker box. when you turn on a lamp, the hot part of the outlet allows electricity to flow" I got this info from Google.com

Explanation:

4 0
3 years ago
What is the name of the computer through which e-mail messages are sent and received?
nalin [4]
A mail server. --------------------------------------------
8 0
3 years ago
What is Sleep mode? Check all of the boxes that apply.
9966 [12]

It is a power-saving mode for a computer.

It is a power-saving mode designed for laptops.

6 0
3 years ago
Other questions:
  • What specific type of tools can assist teams by identifying attacks and indicators of compromise by collecting, aggregating, and
    8·1 answer
  • 1. compression
    11·1 answer
  • Create a calendar named fitness and then display it in a calendar view with the default calendar.
    15·1 answer
  • Normal wear and road conditions can take their toll on a car’s steering and suspension system, altering __________. A. wheel ali
    15·2 answers
  • Which element appears within the top margin of the document but does not form the part of the body of the text?
    15·1 answer
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • a rule that states each foreign key value must match a primary key value in the other relation is called the
    5·1 answer
  • Part of metacognition involves making a plan to address <br> .
    9·2 answers
  • A monopoly is a market that has few competing businesses. many sellers of the same item. many sellers of a variety of products.
    8·2 answers
  • Which group scope can be used to assign permissions to resources only in the domain in which the group is created
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!