R
Roedy Green
how to change a Swing app to a JApplet?
what should I change in codes?
It is a lot easier to convert a JApplet to a application or a hybrid
than the reverse. Have a look at some of my hybrids at
http://mindprod.com/products1.html
You move all your code to allocate and set up components to init.
Init also must set up the listeners and do the layout. I use IntelliJ
to refactor the code to put each of these functions in its own method
called by init.
You then need to write your start, stop and destroy, often empty.
Make user you use JApplet.getContentpane rather than using JApplet
directly for setBackground, setLayout and add.
look at one of my programs like
http://mindprod.com/products1.html#AMERICANTAX
to see the overall structure.