Tenho uma aplicação e tenho q transformá-la em um Applet, gostaria de uma ajuda de como implementar.
Segue o código da aplicação é um jogo da Velha Simples.
Grata desde já 
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
public class JogoDaVelha extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
private JButton[][] botoes;
private String vez;
private boolean terminou;
//Mudança de cores dos breguetinhos
private static final Color COR_X = Color.GREEN;
private static final Color COR_O = Color.PINK;
public JogoDaVelha() throws HeadlessException {
super("Jogo da Velha");
// Define tamanho da janela
setSize(200, 240);
// Define menu
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Jogo");
JMenuItem iteNovo = new JMenuItem("Novo Jogo");
iteNovo.addActionListener(this);
menu.add(iteNovo);
menu.addSeparator();
JMenuItem iteSair = new JMenuItem("Sair");
iteSair.addActionListener(this);
menu.add(iteSair);
menuBar.add(menu);
setJMenuBar(menuBar);
// Panel com os botões
criarNovoJogo();
// Chama método para centralizar janela
centralizarJanela();
// Prepara saída da janela
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
public final void windowClosing(final WindowEvent e) {
if (JOptionPane.showConfirmDialog(null, "Deseja fechar o jogo da velha?", "Fechar", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) {
System.exit(0);
}
}
});
}
private void criarNovoJogo() {
getContentPane().removeAll();
// Define layout da janela
int borda = 25;
getContentPane().setLayout(new BorderLayout());
getContentPane().add(Box.createVerticalStrut(borda), BorderLayout.NORTH);
getContentPane().add(Box.createVerticalStrut(borda), BorderLayout.SOUTH);
getContentPane().add(Box.createHorizontalStrut(borda), BorderLayout.EAST);
getContentPane().add(Box.createHorizontalStrut(borda), BorderLayout.WEST);
JPanel pJogo = new JPanel();
pJogo.setLayout(new GridLayout(3, 3));
// Cria conjunto de botões
botoes = new JButton[3][3];
Font font = new Font("Verdana", Font.BOLD, 14);
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 3; x++) {
botoes[x][y] = new JButton();
botoes[x][y].setActionCommand("b" + x + "_" + y);
botoes[x][y].addActionListener(this);
botoes[x][y].setFont(font);
pJogo.add(botoes[x][y]);
}
}
getContentPane().add(pJogo, BorderLayout.CENTER);
getContentPane().validate();
// Começa o X
vez = "X";
terminou = false;
}
public void actionPerformed(ActionEvent arg0) {
if ("Sair".equals(arg0.getActionCommand())) {
if (JOptionPane.showConfirmDialog(null, "Deseja sair do jogo da velha?", "Sair", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) {
System.exit(0);
}
} else if ("Novo Jogo".equals(arg0.getActionCommand())) {
criarNovoJogo();
} else if (arg0.getActionCommand().startsWith("b")) {
if (terminou) {
JOptionPane.showMessageDialog(null, "Jogo finalizado!", "Erro", JOptionPane.ERROR_MESSAGE);
} else {
String[] coord = arg0.getActionCommand().substring(1).split("_");
int x = Integer.parseInt(coord[0]);
int y = Integer.parseInt(coord[1]);
if (botoes[x][y].getText().equals("")) {
botoes[x][y].setText(vez);
if (vez.equals("X")) {
botoes[x][y].setForeground(COR_X);
vez = "O";
} else {
botoes[x][y].setForeground(COR_O);
vez = "X";
}
verificarVitoria();
} else {
JOptionPane.showMessageDialog(null, "Posição já foi marcada!", "Erro", JOptionPane.ERROR_MESSAGE);
}
}
}
}
private void verificarVitoria() {
String vencedor = "";
// Verifica horizontais e verticais
for (int i = 0; i < 3; i++) {
if (!botoes[i][0].getText().equals("")) {
if ((botoes[i][0].getText().equals(botoes[i][1].getText())) && (botoes[i][2].getText().equals(botoes[i][1].getText()))) {
terminou = true;
vencedor = botoes[i][0].getText();
break;
}
}
if (!botoes[0][i].getText().equals("")) {
if ((botoes[0][i].getText().equals(botoes[1][i].getText())) && (botoes[2][i].getText().equals(botoes[1][i].getText()))) {
terminou = true;
vencedor = botoes[0][i].getText();
break;
}
}
}
// Verifica diagonais
if (!botoes[1][1].getText().equals("")) {
if ((botoes[0][0].getText().equals(botoes[1][1].getText())) && (botoes[2][2].getText().equals(botoes[1][1].getText()))) {
terminou = true;
vencedor = botoes[1][1].getText();
} else if ((botoes[0][2].getText().equals(botoes[1][1].getText())) && (botoes[2][0].getText().equals(botoes[1][1].getText()))) {
terminou = true;
vencedor = botoes[1][1].getText();
}
}
if (terminou) {
JOptionPane.showMessageDialog(null, vencedor + " é o vencedor!", "Vitória", JOptionPane.INFORMATION_MESSAGE);
}
}
public final void centralizarJanela() {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
int x = ge.getCenterPoint().x - (this.getWidth() / 2);
int y = ge.getCenterPoint().y - (this.getHeight() / 2);
setLocation(x, y);
}
/**
* @param args
*/
public static void main(String[] args) {
JogoDaVelha jogo = new JogoDaVelha();
jogo.setVisible(true);
}
}