jframeobjects - Objects of class JFrame Thus far, you have...

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

View Full Document Right Arrow Icon
Objects of class JFrame Thus far, you have seen powerpoint slides that showed what an object is, how to call methods of an object, how to reference fields of an object, and how to create a new object using a new-expression. We now make these concepts more concrete using DrJava. You will see the creation of new objects, execution of procedure calls, and evaluation of function calls. In Java, an object of class javax.swing.JFrame is associated with a window on your monitor. We will show you later how the rather long name javax.swing.JFrame can be abbreviated to simply JFrame . Class JFrame comes with every implementation of Java. The upper right pane of DrJava, give a list of the methods that are in each object of class JFrame . What they do is indicated in the method names. We begin by creating a new object of class JFrame , using a new-expression, and assigning it to a variable x : x= new javax.swing.JFrame(); The upper right pane in DrJava shows variable x and the new object. Calling procedures
Background image of page 1

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

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

This note was uploaded on 07/07/2008 for the course CS 101 taught by Professor Gries during the Spring '08 term at Cornell University (Engineering School).

Page1 / 2

jframeobjects - Objects of class JFrame Thus far, you have...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online