English 中文(简体)
是否使用贾瓦 app弹使该页的负荷放慢?
原标题:Is using Java applet makes the page to load slower?
package javaapplication3;

import java.applet.Applet;
import java.awt.*;

/*<applet code="NewApplet" width="3000" height="80">
<param name="fontName" value="Courrier"></applet>*/
public class NewApplet extends Applet{
    int c,d;

    public void start(){
      c=9;d=8;
    }

    public void paint(Graphics g)
    {
      g.drawString("Muliplication"+c*d,0,10);
    }
}

I have read many advantages/disadvantages of Java applet in many sites, but still I want to know some things:

  1. Is it necessary for a user to have JDK and JRE installed on his/her system to run applet on web browser?
  2. Will this program makes the browser to download these two packages (java.applet.Applet,java.awt.*)?
  3. Is using Applet good or bad?
最佳回答
  1. Only the JRE
  2. No, they are included in the JRE
  3. Bad, Java applets aren t a recommended web technology anymore and probably many of your users will not see them properly. Java applets should be reserved for some special applications and probably Intranet only.

目前在贾瓦的传单中,大多数是用超文本5、Javascript、Ajax等书写的“Web 2.0-et”,而不需要任何插手。

问题回答
  1. JRE not JDK
  2. Check this out because it seems you have not understood the concept of java packages en.wikipedia.org/wiki/Java_package
  3. Read this: http://www.ehow.com/info_12152621_advantages-disadvantages-using-java-applets.html




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签