Converting Swing to Applets
I have a swing GUI and my employer asked me to convert the whole thing into applets. I just wonder if there is a simpler way of doing it. My GUI now contains only basic swing components like JTabbedPane, JTable etc...,
If you go for JApplet then you can change the JFrame(s) into JApplets, by writing
"extends JApplet" instead of "extends JFrame" in the class header. Then a
compilation will tell which code-parts that have to be changed. If you have several
JFrames popping up in your app (also modal dialogs) you should reconsider that
strategy (especially if your JFrames get parameters from another) and go for a panel
substitution method, thus staying in one HTML page all the time.
Then of course there is the issue of loading images/documents and DB access. The
amount of work you have to put into porting the DB access to applet(s) depends
largely on how it is already implemented in your app; serialization is a good thing.
Thanks for your response.. I managed to convert that and its running perfectly on my IDE but if i try to run it on a browser, it says Applet started but am not seeing anything...
I have created a jar file for the classes that are created during compilation and included it in the archive parameter of the <applet>
this thing is killing me. any help will be greatly appreciated..
You should check the output in the browser's java console window when it loads your
applet page. The reason for the loadfailure should be there, as an exception
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center