public class test extends javax.swing.JApplet{ ... public void testfunction() { irgedwas ... } ...}class test1 extends Panel{ .....}