addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
// Add the canvases to the layout
Container contents = getContentPane();
c.setSize(200,200);
t.setSize(200,200);
contents.add(c,"North");
contents.add(t,"South");
pack();