her er koden
hele magien er i:
try
{
jEditorPane2.setPage(\"
http://www.imod.dk/newspage.php\");
}
catch (IOException e)
{
}
p.s. det er som sagt bare blevet smidt sammen :)
/*
* htmler.java
*
* Created on 7. august 2001, 10:11
*/
import java.io.*;
/**
*
* @author srr
* @version
*/
public class htmler extends javax.swing.JDialog {
/** Creates new form htmler */
public htmler(java.awt.Frame parent,boolean modal) {
super (parent, modal);
initComponents ();
pack ();
try
{
jEditorPane2.setPage(\"
http://www.imod.dk/newspage.php\");
}
catch (IOException e)
{
}
}
/** 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 FormEditor.
*/
private void initComponents()
{
jPanel2 = new javax.swing.JPanel();
jEditorPane2 = new javax.swing.JEditorPane();
getContentPane().setLayout(new java.awt.FlowLayout());
addWindowListener(new java.awt.event.WindowAdapter()
{
public void windowClosing(java.awt.event.WindowEvent evt)
{
closeDialog(evt);
}
}
);
jPanel2.setPreferredSize(new java.awt.Dimension(800, 600));
jPanel2.setMinimumSize(new java.awt.Dimension(800, 600));
jEditorPane2.setPreferredSize(new java.awt.Dimension(800, 600));
jEditorPane2.setMinimumSize(new java.awt.Dimension(800, 600));
jPanel2.add(jEditorPane2);
getContentPane().add(jPanel2);
}
/** Closes the dialog */
private void closeDialog(java.awt.event.WindowEvent evt) {
setVisible (false);
dispose ();
}
/**
* @param args the command line arguments
*/
public static void main (String args[]) {
new htmler (new javax.swing.JFrame (), true).show ();
}
// Variables declaration - do not modify
private javax.swing.JPanel jPanel2;
private javax.swing.JEditorPane jEditorPane2;
// End of variables declaration
}