We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › using swing or awt ui components in an applet
Page Index Toggle Pages: 1
using swing or awt ui components in an applet (Read 2842 times)
using swing or awt ui components in an applet
Jun 3rd, 2010, 10:47pm
 
has anyone been successful in creating an applet that utilizes swing or awt ui components? if so, care to share an example?

I tried to recreate this example:
http://processing.org/hacks/hacks:swingsliders

I am able to run it as an application, but not as applet.

I am relatively new to working with eclipse, have been trying out the proclipsing framework, and I like it so far, impressed with its ease of use, but this issue is a bit of a stumbling block.

In the (non-swing/awt) applets I have run successfully with proclipse , the primary class extended PApplet. Not sure what needs to happen when the primary class creates the PApplet...

Any help would be greatly appreciated.

r
Re: using swing or awt ui components in an applet
Reply #1 - Jun 4th, 2010, 2:23am
 
Basically, they are incompatible with Processing timing/threading scheme, and Processing developers discourage such mix.
There was a GUI library using Swing (or AWT?) components (SpringGUI IIRC) but it was obsoleted by newer versions of Processing.
Re: using swing or awt ui components in an applet
Reply #2 - Jun 5th, 2010, 4:06am
 
I tried it in my projects for students.
It works in IE and Firefox. I tested applet on XP and Linux.
Sometimes refresh of page or click on applet is needed to show controls.

http://www.arh.bg.ac.rs/upload/gils/index.html
3D L-Systems applet
Re: using swing or awt ui components in an applet
Reply #3 - Jun 5th, 2010, 7:36am
 
Thanks for the replies.

I was actually using SpringGUI early on in this project but it is not an option moving forward since it is not running on OSX.

My primary need in the sketch is buttons, for which it seems Interfascia is the best option among those in the Libraries section of the site. It has minimal styling of colors, but I was hoping for an option that allowed for buttons that look more like native browser buttons.

Let me know if you have any other ideas.

Thanks again.
Page Index Toggle Pages: 1