MyHelloProgram - import acm.program.*; i public class...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: MyHelloProgram.java * ----------------------- * This program displays "hello, world" in the * drawing window and "CS1MD3" at the lower-right * corner. This version uses explicit coordinate * values, which makes the program difficult to extend * or maintain. * * Author: CS1MD3 */ import acm.graphics.*;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: import acm.program.*; i public class MyHelloProgram extends GraphicsProgram { p public void run() { /* display "hello, world" */ add(new GLabel("hello, world", 300, 200)); /* display "CS1MD3" at the lower-right corner */ add(new GLabel("CS1MD3", 680, 480)); } }...
View Full Document

This note was uploaded on 10/27/2009 for the course COMP SCI 1MD3 taught by Professor Various during the Winter '07 term at McMaster University.

Ask a homework question - tutors are online