Hello all.
I’m fairly new to Xith and Java development. I was trying to have an easy swing GUI just come up on top of Xith. While I can get it to work on my PC, the Mac has problems.
Relevant code is pretty short:
JFrame mainFrame = new JFrame();
mainFrame.setVisible(true);
mainFrame.setSize(1000,500);
mainFrame.getContentPane().setLayout(new BorderLayout());
Panel panel = new Panel();
panel.setLayout(new BorderLayout());
Button button = new Button("click me");
panel.add(button);
panel.setVisible(true);
panel.setSize(100,100);
panel.setLocation(600,100);
mainFrame.getLayeredPane().add(panel);
mainFrame.validate();
RenderPeer rp = new RenderPeerImpl();
CanvasPeer cp = rp.makeCanvas(mainFrame.getLayeredPane(),640,480,32,false);
Canvas3D canvas = new Canvas3D();
canvas.set3DPeer(cp);
view.addCanvas3D(canvas);
You should see your Xith render on the left of the frame with the button on the right side - half over the render and half not. On the PC this works fine, the whole button is drawn on top of Xith. But on the Mac Xith is always drawn on top - you only see the half of the button.
Any thoughts on why they’d be diffrent or what I could do to fix it?
Thanks