{
final JPanel content = new JPanel(new BorderLayout());
content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
final InternalDemoHandler demoHandler = getDemoHandler();
final JEditorPane editorPane = new JEditorPane();
final URL url = demoHandler.getDemoDescriptionSource();
editorPane.setEditable(false);
editorPane.setPreferredSize(new Dimension(400, 200));
if (url != null)
{
try
{
editorPane.setPage(url);
}
catch (IOException e)
{
editorPane.setText("Unable to load the demo description. Error: " + e.getMessage());
}
}
else
{
editorPane.setText("Unable to load the demo description. No such resource.");
}
final JScrollPane scroll = new JScrollPane(editorPane,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);