Update of /cvsroot/tail/TailS/src/java/net/sf/tails/swing/help
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11099/src/java/net/sf/tails/swing/help
Added Files:
HelpFrame.java
Log Message:
--- NEW FILE: HelpFrame.java ---
/*
* helpFrame.java
*
* Created on 22 de Outubro de 2007, 19:00
*/
package net.sf.tails.swing.help;
import java.io.File;
import java.util.ResourceBundle;
/**
*
* @author Marcio
*/
public class HelpFrame extends javax.swing.JFrame {
private javax.swing.JEditorPane jEditorPane1;
private javax.swing.JScrollPane jScrollPane1;
/**
*
*/
private static final long serialVersionUID = 4602119139785751108L;
public HelpFrame() {
ResourceBundle bundle = ResourceBundle.getBundle("net.sf.tails.i18n.Files");
initComponents();
try{
File file = new File(bundle.getString("HELP_FILE"));
jEditorPane1.setPage("file:////"+file.getAbsolutePath());
}catch(Exception e){
e.printStackTrace();
}
}
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Código Gerado ">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jEditorPane1 = new javax.swing.JEditorPane();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jScrollPane1.setViewportView(jEditorPane1);
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, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new HelpFrame().setVisible(true);
}
});
}
}
|