3 Jul 03:58
Re: mouse coordinates
thomasacherry <jceaser <at> mac.com>
2005-07-03 01:58:33 GMT
2005-07-03 01:58:33 GMT
I finally got around to try this out, but in my application the bean never receives any
events. I don't think Thinlet is passing the events on the my object, does this sound right?
>
> well.
> the following worked for me.
>
> in the thinlet xml:
> <panel name="drawingregion" gap="0" top="0" right="0" bottom="0"
> left="0" columns="1">
> <bean name="chart" bean="DrawingRegion" weightx="1" weighty="3" />
> </panel>
>
> DrawingRegion extends java.awt.Canvas
>
> and in the java code. I placed the following code in the paint() method
> of the thinlet application. could be done anywhere after displaying the
> component containing the Canvas.
>
> dr = null;
> Object desktop = getDesktop();
> Object panel = find(desktop, "drawingregion");
> if (panel != null) {
> Object bean = find(panel, "chart");
> if (bean != null) {
> dr = (DrawingRegion) getComponent(bean, "bean");
>
> }
> }
(Continue reading)
RSS Feed