{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Unit Test 13D - Unit 13 Readiness Test Version D Answer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Unit 13 Readiness Test Version D Answer following questions: 1. a. Explain carefully what the destroy() method does. The destroy() method is called after the stop() method in order to free up all the resources that are being held. b. What is a Graphics - i. Object – the “thing” that is manipulated. In graphics, they can be colors you want to set your background or your text to. ii. Method – functions such as init(), start(), stop(), etc. that allow a programmer to control what the applet does. iii. Applet – literally a small application. They are compiled Java programs that don’t run on their own and are used to add interactivity to a web page or a program. iv. Class – a specification for an object that contains properties and methods for using the object. 2. Write a simple java applet to print your ME205 User ID and the unit your are working on. Paint the background color blue. import java.awt.*; import java.applet.*; import java.awt.event.*; public class TrivialApplet extends Applet { public void paint( Graphics g ) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}