Java Reference
In-Depth Information
L ISTING 8.4 The editor1.jnlp File
<?xml version=”1.0” encoding=”utf-8”?>
<jnlp spec=”1.0+”
codebase=”http://server/b2/c8/editor1/”
href=”editor1.jnlp”>
<information>
<title>A Text Editor</title>
<vendor>Mauro Inc.</vendor>
<homepage href=”home.html”/>
<description>Load, edit and save any text file quickly and
effectively!</description>
<description kind=”short”>A simple Java text editor</description>
<description kind=”tooltip”>A text Editor</description>
<icon href=”img/logo.gif”/>
<offline-allowed/>
</information>
<resources>
<j2se version=”1.3”/>
<jar href=”editor1.jar”/>
</resources>
<application-desc main-class=”com.marinilli.b2.c8.editor1.Editor1”/>
</jnlp>
Listing 8.5 shows the launched Java class. It is a simple JFrame that contains a dummy toolbar
and a TextArea .
L ISTING 8.5 The Editor1 Java Class
package com.marinilli.b2.c8.editor1;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* A Simple Text Editor
*
* @author Mauro Marinilli
* @version 1.0
*/
public class Editor1 extends JFrame {
ClassLoader loader;
public Editor1() {
Search WWH ::




Custom Search