Application Java-Applet for text protection on sites from copying

Application Java-Applet for text protection on sites from copying In section examples of realization of applied programs Java Applet for text protection on sites from copying are presented. Java-applets are cross-platform and cross-browsers the programs written in language Java. Performance Java-Applet in web-browsers is carried out by means of virtual Java cars which is connected to the browser in a kind plug-in and established in the majority of browsers by default.

The programs (applets) written in language Java, are simply enough inserted into hypertext HTML of pages. It is for this purpose used HTML teg <APPLET>. Preliminary, programs on Java are compiled in bytes-codes which are executed modules and have expansion of *.class.

Example of the hypertext for embedding Java Applet in HTML page:
<APPLET CODE="myApplet.class" WIDTH="700" HEIGHT="1800">
<param name="myText" value="Hello World!">
</APPLET>
Protection of the text against copying is carried out by transformation of the text data to a graphic kind. Base method Java which is applied to transformation of the text information to the graphic form, the method paint (Graphics is...) . The elementary design of drawing of the text looks as follows:
public void paint(Graphics g) {
            ...
            g.drawString("Hello World!",X, Y);
}
The basic feature of display of a drawing by means of procedure drawString (...) consists in direct use of the video adapter (video card) For a drawing conclusion. The majority of video adapters can work or in a text mode or a graphic mode. In a graphic mode, the monitor can display any byte image. The text deduced in a browser window (in a graphic mode of the video adapter) can't neither be kept in the form of a file, nor to copy as the usual text. Probably only to fix video an image in a clipboard (clipboard) the computer.

Some examples of realization of Java-applets for protection of the text against copying:



Russian