• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include a actionlistener class in applet tags

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i include more that one class file in the

<applet code="filename.class">

?

Justin Fox
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class mentioned in the code attribute is the main applet class; no further clases can (or need) to be specified here. All other classes do not need to be especially listed. As long as they are in the same directory (or directory hierarchy) as the main class, they will be found automatically.

If you have a lot of classes, you may wish to create a jar file that contains them all. For this you;d need an archive attribute. That reduces download time because instead of many individual downloads (one for each class), only a single one for the jar file would be necessary.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic