|
|
Exercise Six
Exercise Six
- Okay, let's build a very simple user
interface which will consist of a simple Frame which contains
a simple Panel. We will fill in this interface in the next
couple of sections.
- Here is what your code should look
like:
import java.awt.*;
public class TestFrame
{
public static void main(String[] args)
{
Frame myFrame = new Frame();
myFrame.reshape(10,10,200,200);
myFrame.setTitle("My Frame");
Panel myPanel = new Panel();
myFrame.add(myPanel);
myFrame.show();
}
}
Containers
Table of Contents
Layouts
|
|