/* Copyright (C) 2009 Rachel Engel This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package com.isecpartners.gizmo; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.Font; /** * * @author Rachel Engel <rachel@isecpartners.com> */ public class Help extends javax.swing.JFrame { /** Creates new form Help */ public Help() { initComponents(); jTextPane1.setEditable(false); //jTextPanel.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14)); jTextPane1.setText( "Version: $Rev: 53 $: \n\n" + "Up to date instructions can be found on the web at: \n" + "http://code.google.com/p/gizmo-proxy/wiki/help?ts=1244670354&updated=help\n\n" + "Source code and gizmo releases can be found at:\nhttp://code.google.com/p/gizmo-proxy/"); jTextPane1.setCaretPosition(0); setup_keys(); } private void setup_keys() { KeyListener closeListener = new KeyListener() { public void keyTyped(KeyEvent e) { } public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { Help.this.dispose(); } } public void keyReleased(KeyEvent e) { } }; this.jScrollPane1.addKeyListener(closeListener); this.jTextPane1.addKeyListener(closeListener); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTextPane1 = new javax.swing.JTextPane(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setName("Form"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N jTextPane1.setFont(new java.awt.Font("Monospaced", 0, 14)); jTextPane1.setMinimumSize(new java.awt.Dimension(800, 400)); jTextPane1.setName("jTextPane1"); // NOI18N jScrollPane1.setViewportView(jTextPane1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 744, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Help().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextPane jTextPane1; // End of variables declaration//GEN-END:variables }