Requires Free Membership to View
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
javax.swing.JEditorPane htmlPane = new javax.swing.JEditorPane();
htmlPane.setEditable(false);
htmlPane.setPreferredSize(new Dimension(width, height));
htmlPane.setContentType("text/html");
htmlPane.setText("<HTML><HEAD></HEAD><BODY>Body content added
here</BODY></HTML>");
javax.swing.JScrollPane scrollPane = new
javax.swing.JScrollPane(htmlPane);
scrollPane.setPreferredSize(new Dimension(width, height));
mainPanel.add(scrollPane, BorderLayout.CENTER);
This was first published in June 2002

Join the conversationComment
Share
Comments
Results
Contribute to the conversation