-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainClass.java
More file actions
33 lines (24 loc) · 1.27 KB
/
Copy pathMainClass.java
File metadata and controls
33 lines (24 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package FinalAssignment;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import uk.ac.leedsbeckett.oop.LBUGraphics;
public class MainClass extends LBUGraphics
{
public MainClass()
{
JFrame MainFrame = new JFrame(); //Create a frame to display the turtle panel on.
MainFrame.setLayout(new FlowLayout()); //not strictly necessary
MainFrame.add(this); //"this" is this object that extends turtle graphics so we are adding a turtle graphics panel to the frame
MainFrame.pack(); //set the frame to a size we can see
MainFrame.setVisible(true); //now display it
about(); //call the LBUGraphics about method to display version information.
}
@Override
public void processCommand(String arg0) {
// TODO Auto-generated method stub
}
public static void main(String[] args)
{
MainClass Draw = new MainClass(); //Creating instance of MainClass that extends LBUGraphics.
}
}