/* * @(#)EditorPane.java 1.0 13 February 2005 * * Copyright (c) 2004 Werner Randelshofer, Immensee, Switzerland. * All rights reserved. * * You may not use, copy or modify this file, except in compliance with the * license agreement you entered into with Werner Randelshofer. * For details see accompanying license terms. */ package test; /** * EditorPane. * * @author Werner Randelshofer * @version 1.0 13 February 2005 Created. */ public class EditorPaneTest extends javax.swing.JPanel { /** Creates new form. */ public EditorPaneTest() { initComponents(); } /** 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="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; scrollPane1 = new javax.swing.JScrollPane(); editorPane1 = new javax.swing.JEditorPane(); scrollPane2 = new javax.swing.JScrollPane(); editorPane2 = new javax.swing.JEditorPane(); scrollPane3 = new javax.swing.JScrollPane(); editorPane3 = new javax.swing.JEditorPane(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); setBorder(javax.swing.BorderFactory.createEmptyBorder(16, 17, 17, 17)); setLayout(new java.awt.GridBagLayout()); editorPane1.setText("the quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog"); scrollPane1.setViewportView(editorPane1); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(scrollPane1, gridBagConstraints); editorPane2.setEditable(false); editorPane2.setText("the quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog"); scrollPane2.setViewportView(editorPane2); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(scrollPane2, gridBagConstraints); editorPane3.setText("the quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog\nthe quick brown fox jumps over the lazy dog"); editorPane3.setEnabled(false); scrollPane3.setViewportView(editorPane3); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(scrollPane3, gridBagConstraints); jLabel1.setText("Editable"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(jLabel1, gridBagConstraints); jLabel2.setText("Non-Editable"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(jLabel2, gridBagConstraints); jLabel3.setText("Disabled"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); add(jLabel3, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JEditorPane editorPane1; private javax.swing.JEditorPane editorPane2; private javax.swing.JEditorPane editorPane3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane scrollPane1; private javax.swing.JScrollPane scrollPane2; private javax.swing.JScrollPane scrollPane3; // End of variables declaration//GEN-END:variables }