Converting Swing to Applets


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Converting Swing to Applets

Hybrid View

  1. #1
    Join Date
    May 2005
    Posts
    2

    Converting Swing to Applets

    Hello

    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...,

    Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    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.
    eschew obfuscation

  3. #3
    Join Date
    May 2005
    Posts
    2
    Hi

    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..

  4. #4
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    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
    stracktrace listing.
    eschew obfuscation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center