Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 13. Compiling Jython > A Simple Applet

13.5. A Simple Applet

To use a Java applet, you need to compile it using jythonc due to the class loader and sandbox issues mentioned at the beginning of this chapter. Using jythonc for applets is straightforward. Here is the Java code for a very simple applet:

from java.applet import Applet

class Hello(Applet):
    def paint(self, g):
       g.drawString("Hello from Jython Essentials!")


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial