Why doesnt LwjglApplet extend JApplet?

Anything libgdx related goes here!

Why doesnt LwjglApplet extend JApplet?

Postby DaysShadow » Fri May 25, 2012 9:50 pm

I'm currently working on an application in which i use a canvas and swing components, as in your particle editor for example.
On desktop everything is nice but I want this app to work as an applet as well but this doesnt work for now as LwjglApplet extends Applet and for using swing i need it to extend JApplet.

Is there a reason why it doesnt extend JApplet, unnecessary load or anything?

Thanks and greetings
DaysShadow
 
Posts: 6
Joined: Thu Apr 21, 2011 10:24 pm

Re: Why doesnt LwjglApplet extend JApplet?

Postby mzechner » Sat May 26, 2012 10:05 am

Good question, i'm not sure (didn't write the LwjglApplet). It seems that all information on Lwjgl indicates that one has to use Applets and not JApplet. I'll bring in Nate.
mzechner
Site Admin
 
Posts: 4715
Joined: Sat Jul 10, 2010 3:50 pm

Re: Why doesnt LwjglApplet extend JApplet?

Postby DaysShadow » Sat May 26, 2012 12:07 pm

Alright, that'd be nice :)

As far as i read JApplet itself extends Applet and also uses the same unchanged main methods(update, draw methods and such) as Applet
DaysShadow
 
Posts: 6
Joined: Thu Apr 21, 2011 10:24 pm

Re: Why doesnt LwjglApplet extend JApplet?

Postby NateS » Sat May 26, 2012 6:54 pm

::swings in thru the window, shards of glass scattering everywhere::

I guess Applet is slightly more lightweight than JApplet. No reason to use the Swing stuff when it is not needed for an applet that only displays OpenGL. You could probably use your own JApplet and embed LwjglCanvas.

::puff of smoke::
NateS
 
Posts: 1965
Joined: Fri Nov 12, 2010 11:08 am

Re: Why doesnt LwjglApplet extend JApplet?

Postby DaysShadow » Sat May 26, 2012 9:52 pm

Hi Nates,

i thought so already, so i'll have my fun putting the things together ;)

Thanks.
DaysShadow
 
Posts: 6
Joined: Thu Apr 21, 2011 10:24 pm


Return to Libgdx

Who is online

Users browsing this forum: Bing [Bot] and 9 guests