Hi
I am using a swing gui in my xith3d application. I have created the gui by subclassing the UIWindow class, and then I draw it to my canvas using:
UIWindowManager windowMgr = new UIWindowManager(canvas);
window = new InfoWindow(120, 200);
windowMgr.addOverlay(window);
windowMgr.setPosition(window,10, 10);
windowMgr.setVisible(window, true);
UIEventAdapter eventAdapter = new UIEventAdapter(windowMgr);
// canvas.get3DPeer().getComponent().addKeyListener(eventAdapter);
canvas.get3DPeer().getComponent().addMouseListener(eventAdapter);
canvas.get3DPeer().getComponent().addMouseMotionListener(eventAdapter);
canvas.get3DPeer().getComponent().setFocusable(true);
The gui is drawn, but with very noticeble artifacts, as if it has been scaled up or down. When trying to interact with the components, I constantly have to click a few pixels to the left of the component.
If I scale the window up or down, the gui is also scaled, but the “hotspots” for the interaction stay in the same location, so the more I scale the window up, the further away from the buttons I have to click.
Is this a bug, or is it like that by design? Did I miss something?
btw, I tried using the TestWindow class from the TerrainTest instead of my own, and I get the same results.
Terje