
I've started my first venture into using Java to create an Applet, it's going to be a simple web-based tutorial set with a back and forward button, text and pictures intended to help people who are struggling with using certain basic programs.
I'm currently testing how everything works before I assemble it into a full-fledged program, but I'm having horrible trouble with the JButtons. Here is the code I have so far.
import java.awt.*;
import javax.swing.*;
public class tp extends JApplet {
Container content;
public void init () {
content = getContentPane();
JButton button1 = new JButton("Test 1");
button1.setPreferredSize(new Dimension(50,50));
content.add(button1);
JButton button2 = new JButton("Test 2");
button2.setPreferredSize(new Dimension(50,50));
content.add(button2);
} //end init
} //end class tp
Now, when I run this in a HTML page, I get one of two results; this in IE:

And this in FireFox:

...note, that the smaller button in the firefox picture is invisible until you clickon where it is, then it shows until the mouse pointer leaves the area.
I'm only running the applet as a 100x100 window in this example, however, whichever is the 'dominant' button takes up the entire applet space, regardless of how I try to size it. I've trawled the internet for hours looking for someone with a similar problem but alas, have found none, so I thought I'd ask for some help

Please and thank you!
~Fae