Java Reference
In-Depth Information
Note that we requested an unrestricted security environment, so all JAR files used
must be signed, including the third-party icon file.
In Listing 13.3, our application's main class is listed, abridged of some uninteresting code for
menu creation (method populate at line 85).
L ISTING 13.3 The MainFrame Class
package com.marinilli.b2.c13;
import com.marinilli.b2.c13.draw.EmbeddedDraw;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.text.*;
import java.util.*;
import com.marinilli.b2.c13.util.*;
* Chapter 13 - Main class for the Textuale application
* @author Mauro Marinilli
* @version 1.0
public class MainFrame extends JFrame {
StyledEditorKit editor;
JScrollPane jScrollPane1 = new JScrollPane();
JTextPane textPane = new JTextPane();
BorderLayout borderLayout1 = new BorderLayout();
JToolBar toolbar = new JToolBar();
JMenuBar menubar = new JMenuBar();
JButton addImageButton = new JButton();
JButton infoButton = new JButton();
// GUI-related initialization
private Hashtable actionTable = new Hashtable();
private String[] cutCopyPasteActionNames = new String[] {
DefaultEditorKit.cutAction, “Cut”,
DefaultEditorKit.copyAction, “Copy”,
Search WWH ::

Custom Search