I am trying to convert a java application into an applet.
I had a JFrame which had a 5 JPanels on it so to convert it I made the JFrame into a JPanel (mainPanel) and made the class extend JApplet.
However, I cannot update any of the panels when the mainPanel is on the applet however with exactly the same code – when the mainPanel is on a JFrame it works and the panels update.
Can anyone help?
Josh, converting a JFrame to JApplet is very easy.
Say you have a JFrame like this:
This class can easily become a JApplet:
Note the difference – initComponents() became init() because Applets need the init() method.