Representing HTML text in JGoView


I need to add component to JGoView, which previews an HTML text. I have the renderer, which is a JComponent. When I’m trying to use JGoControl to represent this component, it’s always “on top”. Can I override this behaviour or the only way to represent an HTML text is to create my own renderer using JGoObjects?

Best regards,

Nikita Kovalenko.

Unfortunately that’s a characteristic of JGoControl. The entire JGoView is a single JComponent. Because it’s a JComponent, the JGoView cannot contain another JComponent, so a JGoControl is actually a JGoObject that manages another JComponent that is always kept in front of the JGoView.

There are also other issues with JGoControl, for example they don’t print, they don’t scale well, and it’s difficult to handle focus issues.

As an alternative, you might want to consider using another JGoObject to represent your HTML text and bring up an HTML editor when that object is double-clicked on. For example, if you can convert the HTML to an image, you might use that image in a JGoIconicNode.