Let’s suppose I have something like:
Applet myApplet = new MyApplet();
How can I invoke that applet in a way that a new window appears, and I am still able to access that MyApplet instance from that scope?
In general, I want to be able to write code like this:
class Runner {
public static void main(String[] args) {
new Runner().run();
}
void run() {
MyApplet myApplet = new MyApplet();
myApplet.init();
myApplet.doSomething();
}
}
How can I do it?
This question is answered elsewhere, for example, at http://www.dreamincode.net/code/snippet1607.html
I found it via
https://www.google.ru/search?q=java+applet+%22as+application%22