Hi, I was wondering, is their any way to draw/add a JFrame inside a JApplet. I have this JFrame that needs to be in Applet form, and I don't know how to go about doing it. Completely re-writing it is out of the question (5 or so classes). I didn't write it, my teacher did, and he needs it in JApplet form. He would do it himself, but he doesn't have time. This is NOT homework, I'm taking this on of my own free will. Any help would be GREATLY appreciated =]

It's usually not too much trouble to convert from a JFrame to a JApplet as long as you don't run up against the tighter security concerns of applets. Just change the "extends JFrame" to "extends JApplet" and divide the code into the appropriate applet life cycle methods (init, start, stop, destroy). If you run into troubles, just post the code and your questions back here.

Too late for the OP, but I found a much easier way (can't remember where I found it) as long as one doesn't mind an extra window popping up:

import java.awt.*;
import javax.swing.*;
public class BlatherApplet extends JApplet {
 public void init() {
  setLayout(null);
  Blather canvas = new Blather(true);
  canvas.setVisible(true);
 }
}
This article has been dead for over six months. Start a new discussion instead.