Código:
/** * * @author bacata */ public class ProblemJEditorPane extends javax.swing.JFrame { private javax.swing.JEditorPane jEditorPane1; private javax.swing.JScrollPane jScrollPane1; public ProblemJEditorPane() { initComponents(); } private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jEditorPane1 = new javax.swing.JEditorPane(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(null); jScrollPane1.setViewportView(jEditorPane1); getContentPane().add(jScrollPane1); jScrollPane1.setBounds(20, 20, 120, 70); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-175)/2, (screenSize.height-135)/2, 175, 135); } public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new ProblemJEditorPane().setVisible(true); } }); } }