JS The following example shows the use of JavaScript to change the applet state and invoke the method in the applet in JavaScript.
One, the applet source code (TMIN_JS2.JAVA)
Import
Import Java.awt.Graphics;
Import java.awt.Event;
LiveConnect for JavaScript
Not used ... (IT ' s more simple)
public class Tmin_js2 e
IPreparations before the first example:1. there must be a Java compiler, which can be SUN's JDK compiler, Microsoft's VJ ++, or a compiler developed by some other companies, but it is best to choose VJ ++, because it is now the best Java compiler.
2. A text compiling software, which is available on general machines, can be used in notepad. If it is VJ ++, you can skip this step. If it is JDK, you 'd bet
[Document Introduction] display text is the most basic function in Java. It is very simple to support text display.Display text is the most basic function in Java. It supports text display in a very simple way. You only need to use the drawString () function in Graphics. Let's look at the simplest example of ghq:
// Ghq. javaImport java. awt .*;Import
Usually we will browse some Web page content in the browser, when we see the wonderful article information will also be copied and pasted form to save, but there are users in the Copy page content prompts "Cannot copy" problem, this gives us to collect web content to bring trouble, in fact, we can through Win7 64-bit Browser Internet zone disables Java applet script to solve the problem of Web page content
JAVA card application development is not hard ( 2 ) first JAVA Program creation
InEclipseAfter the environment is configured, you can startJavaCard application development. First create a newJava card project. Follow the prompts to enter the project name "testproject", package name "testpackage", and Applet Class Name "testclass ".
CreateJavaC
1 Public classJAVA2 {3 Public Static voidMain (string[] args)4 {5System.out.println ("----------------------");6System.out.println ("| | I want to learn | |);7System.out.println ("| | Java language | |);8System.out.println ("----------------------");9 }Ten}A simple Java applet that outputs multiple linesPublic class
Applets are small programs that run in a browser, and Java is also popular in the world from applets. By writing this applet, we can learn the following knowledge:
1. Applet and the main interface in JApplet
2. Image loading and Mediatracker use
3. Use of threads and direct communication with multiple threads
4. Use of the Thread.Join () method
5. Use of vol
In Linux, Firefox uses Java Applet and many release versions will automatically handle this issue, but I like to use another Firefox, because it is very convenient to download and decompress Firefox, in Linux, JDK or JRE must be installed before Firefox uses the applet. the Firefox 3.6 series will no longer support the Java
Summary
Since Adobe released its public PDF reference for the first time in 1993, PDF tools and libraries supporting various languages and platforms have sprung up. However, the support of Adobe Technology in Java application development lags behind.
Since Adobe released its public PDF reference for the first time in 1
Today, I am going to try out the VPN provided by the company. The last step has encountered a tangled problem.
The prompt is displayed in chrome.
Since the installation of Java 7 will make Java 6 unavailable, use Java 6.
However, on the java6 download page, the system prompts that Apple's Java has been inte
Recently, the 2.0 EDEP of the PBoC was reconstructed, and dozens of details were changed according to customer's needs.The object-oriented understanding is somewhat deepened during the change process.For example, to avoid two class interdependencies, you can use a interface center as a decoupling.Due to the limited space in the card, resource shortage, in the design should be careful to avoid the inheritance hierarchy too deep.Personal feelings, due to limited resources, are unlikely to be used
Use Java Applet to access the databaseTo learn any programming language, of course, it must be related to the database. When Java was just born, its support for the database was not very good. After several years of development, its support for the database has also completely reached a mature situation. Since Java
Import Java.awt.graphics;import Java.applet.applet;public class C4_1 extends applet{int a=5;Double b=23.4;public void Paint (Graphics g) {g.drawstring ("a=" +a,25,25);g.DrawString ("b=" +b,25,65); }}**//The results are as follows:650) this.width=650; "src=" http://img.blog.csdn.net/20150724020233158 "alt=" here write a picture describing "title=" "/>Since the applet does not implement the main () method, in
This is a 300-way random arithmetic applet written by Java, with a range of 0~100 (excluding 100), and the result of the operation preserving two decimal places.Program code:ImportJava.util.*;classyunsuan{ Public Static voidMain (string[] args) {Random rand=NewRandom (); for(inti = 0; I ){ intNUM1 = (int) (rand.nextdouble () * 100); intNum2 = (int) (rand.nextdouble () * 100); Doublenum3 = 0; Cha
An example of the preparation activity before:
1. To have a Java compiler, it can be the sun's JDK compiler, it can be Microsoft's vj++, or it could be a compiler developed by some other companies.
2. A text writing software, the general machine has, Notepad can be. If it is vj++, you can save this step, if the JDK, it is best to have one.
3. Browser, can be Netscape, of course, can also be Microsoft's IE, other browsers, I do not know whether to s
Java not only provides graphics, image support, but also allows users to achieve continuous image playback, that is, animation technology. Java animation implementation, first with the Graphics class in the java.awt package of the DrawImage () method to draw the image on the screen, and then by defining a thread, let the thread sleep for a period of time, and then switch to another image; Draw a series of f
This article describes how to create a Java card project in the eclipse Environment, creating a new applet to run on a Java card.You must install the environment at the moment of setup: Download an eclipse first and then install JCOP. (JCOP download, you need to sign an agreement with NXP to get the installation files, of course, the Internet may find other versi
Recently because of homework, we need to use Java to do some drawing applications, and displayed on the Web page. So, I'm doing some demonstrations here. (There is a mistake, please forgive me)First, you can have the IDE write the good one package first,Here I put the required. class files into this package.Note that in Java applet Chinese, I introduced this pack
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.