I have seen a friend who has written an applet/application in Java (my favourite language) and it functions as an applet and application at the same time.
When he runs it from the command line, it launches a GUI and it will run as an embedded applet too. (UNIX System)
It's a bit off topic though, I'm after some code snippit that I can put in my program to make it run as applet and application without having to have different packages/classes.