Hi,
Im new to jython and python but have been programming in java for a while. I was just wondering why it seems that every variable used has to have self prefixed to it. A basic applet example of mine is below. This wouldnt compile/run until self was placed before each variable and between the brackets of init.
I'd just like to know why this is needed or if im doing something wrong.
 
from javax.swing import *
from java.awt import *
 
 
class Button1(JApplet):
 b1 = JButton("Button 1")
 b2 = JButton("Butotn 2")
 def init(self):
  self.cp = self.getContentPane()
  self.cp.setLayout(FlowLayout())
  self.cp.add(self.b1)