import java.awt.*; import javax.swing.*; public class MyOwnFrame extends JFrame { public MyOwnFrame() { ... // instructions for constructing the window, setting its size, // and making it visible } public void paint(Graphics g) { ... // instructions for painting on the window's surface } }