title: why can't this wxPython frame (and a panel inside) keep its size?
body: <p><em><strong>The background colour of panel is applied to the whole frame! why'd that be happening, I wonder. Here, frame is (300,400) whereas the panel is supposed to be (300,180). I might be doing something wrong.</em></strong></p>
  
  <pre><code>#!/usr/bin/env python
  #-*- coding:utf-8 -*-
  
  import wx
  
  class Panel(wx.Panel):
      def __init__(self, parent, id, pos, size):
          wx.Panel.__init__(self, parent, id, pos, size) 
  
  class Frame(wx.Frame):
      def __init__(self, parent, id, title, pos, size, style):
          wx.Frame.__init__(self, parent, id, title, pos, size, style)
          self.userpanel = Panel(self, -1, (0,0), (300,180))
          self.userpanel.SetBackgroundColour('Gold')
  
  
  class Application(wx.App):
      def __init__(self):
          wx.App.__init__(self)
          frame = Frame(None, -1, "Internet Login Tool", (-1,-1), (300,400),\
          wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
          frame.Show()
          self.SetTopWindow(frame)
  
  if __name__ == '__main__':
      app = Application()
      app.MainLoop()
  </code></pre>