// DrJava saved history v2 // Primitive types: int, double, boolean, char, float, byte, short, long // JFrame: a window // Need to specify that we want to use JFrame: import javax.swing.JFrame; JFrame j1 = new JFrame(); j1.show(); // show() is a method call // instruction: an action to be perform, like "add 7 + 8" // Java statement: an instruction written using the Java language // Java program: an organized collection of Java statements // execute: to follow the instructions j1.setTitle("This is the title."); j1.getX() // There are 3 different types of methods: // functions, procedures, constructors // functions return data of a particular type // procedures perform a set of actions j1.getY() j1.hide() j1.getY() j1.show() j1.Show() // . is a binary operator that works with class variables (e.g., j1) and methods (e.g., show()). import javax.swing.JFrame; JFrame j = new JFrame(); j.show() j.setSize(100,400); j.getX() j.get&() j.getY() j.getWidth() j.getHeight() OurJFrame j1 = new OurJFrame(); j1.show(); j1.doubleSize(); j1.doubleSize(); OurJFrame newWindow = new OurJFrame(); newWindow.show() OurJFrame newWindow = new OurJFrame(); newWindow.setLocation(100, 200) newWindow.show(); newWindow.setLocation(0, 0) OurJFrame newWindow = new OurJFrame(); newWindow.setLocation(100, 200) newWindow.show(); newWindow.moveToOrigin() newWindow.setLocation(100, 200) newWindow.show(); OurJFrame newWindow = new OurJFrame(); newWindow.show(); newWindow.getWidth(); newWindow.getWidth() "this is a String" "X: 0, Y: 0" newWindow.getX() newWindow.getY()