I am trying to find some java code that would represent the display of a set of HTML objects (i.e. this code would go in the paint function). This is to go into a home built IDE f ro HTML and javascript (I can't use a ready made version, for complicated reasons)
I can't use images to represent the HTML objects, as the properties (border color, etc) all need to be changeable.
In short, I require the code that could be used in the paint method of a HTML component.
Does anyone have any idea where I could get this? Or an idea of how to do it. I just tried to hand write the code to represent a select tag, and its very difficult.
EDIT: It turns out (as stated below) that what I am looking for is a HTML renderer. However, the code that I have is javascript, that is interpreted as HTML by a browser. The following code is that generated by the IDE, I have a way of accessing the properties that will be required (borderColor, etc) what I require is a way to render these onto a JPanel. i.e. How can I draw a red box onto the JPanel that represents the DIV below (simple example, I can do this, but need the same for a large subset (preferrably all) css properties):
function componentName(constructor, properties){
this.style = {}
this.style.left = 0; //@property TYPE_TEXT left
this.style.top = 0; //@property TYPE_TEXT top
this.style.width = 100; //@property TYPE_TEXT width
this.style.height = 50; //@property TYPE_TEXT height
this.body0 = document.body
this.body0.onmousedown = this.this.body0_onmousedown
this.body0.style.borderStyle = ""
this.body0.style.borderWidth = "0px"
this.body0.style.overflow = "auto"
this.body0.style.top = "0px"
this.body0.style.left = "0px"
this.body0.style.position = "fixed"
this.body0.name = ""
this.body0.style.backgroundColor = "#ffffff"
this.body0.onmousedown = this.body0_onmousedown
this.body0.style.width = "296px"
this.body0.style.height = "193px"
this.DIV0 = document.createElement("DIV")
this.DIV0.style.height = "216px"
this.DIV0.style.width = "181px"
this.DIV0.onmousedown = this.DIV0_onmousedown
this.DIV0.style.top = "40px"
this.DIV0.style.backgroundColor = "#ff0000"
...etc
}