Advertisement
Guest User

Untitled

a guest
Dec 7th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. from javax.swing import JFrame
  2.  
  3. class SwingSample(JFrame):
  4.  
  5.     def __init__(self):
  6.         super(SwingSample, self).__init__()
  7.  
  8.         self.initUI()
  9.  
  10.     def initUI(self):
  11.  
  12.         self.setTitle("Simple")
  13.         self.setSize(250, 200)
  14.         self.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
  15.         self.setLocationRelativeTo(None)
  16.         self.setVisible(True)
  17.        
  18.  
  19.  
  20. if __name__ == '__main__':
  21.     SwingSample();
  22.     print("Hi");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement