i already have a small application using JFrame. How to turn it into a Applet??
I already make some applet code, that code work in applet viewer but not in a browser. It say applet started, but thre's nothing just a gray box. I think My browser is ok, because it can open other applet. Is there something wrong??? please help
On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.
As to your question, applets work a bit different than applications. For starters, what you might try is to replace these two lines:
Assuming that NewJFrame extends JFrame, there's no need for the "a" JFrame. You also can't add a JFrame (which is a window) to the content pane of another window.
This will open a new window, though. Is that what you want? If not, then you should refactor the code to put whatever goes into NewJFrame (most likely some JComponents) to go in the content pane of the JApplet.