How to change the html of a HTMLPanel
问题 I want do declare a Subclass of an HTMLPanel. In its constructor I want to give it a few paramters to construct the containing html. Because I have to call the super-constructor as first statement, I have to change the html later in the constructor. How can I do this? public class MyHTMLPanel extends HTMLPanel { public MyHTMLPanel(String id, int anotherParameter) { super(""); String html="" // ... some code th construct the html //??? this.setHtml(html); } } 回答1: You don't need to subclass