return to first page linux journal archive
keywordscontents

Listing 2. Portion of Code for Figure 2

1 from java.awt import BorderLayout
2 from pawt.swing import *
3 import sys 
4 def exit(event):
5     sys.exit(0)
6 frame = JFrame('LinuxJournal Example', visible=1)
7 button = JButton('Close Me!', actionPerformed=exit)
8 pane = JPanel(BorderLayout())
9 pane.add(JScrollPane(JTree()), BorderLayout.CENTER)
10 pane.add(button, BorderLayout.SOUTH)
11 frame.contentPane.add(pane)
12 frame.pack()