JTabbedPane unresponsive

瀏覽次數:12 次
跳到第一則未讀訊息

Martin Clifford

未讀,
2014年1月6日 清晨7:40:212014/1/6
收件者:piccolo...@googlegroups.com

Has anyone encountered problems with a JTabbedPane on a PScrollPane?

My tabbed pane displays and zooms but I cannot change tabs.

Here is an extract from my code:

            // Create a Piccolo canvas

            PSwingCanvas canvas = new PSwingCanvas();

            canvas.setBackground(templatePanel.getBackground());

            canvas.setZoomEventHandler(null);    // turn off click and drag zoom control

            canvas.setPanEventHandler(null);     // turn off click and drag pan control

            canvas.getCamera().setViewScale(zoomFactor);  // Set the zoom factor

 

            // Create a Piccolo swing wrapper for the template

            PSwing swing = new PSwing(templatePanel);

            swing.translate(0, 0);

            canvas.getLayer().addChild(swing);

 

            // Create a Piccolo scroll pane for the canvas

            PScrollPane  scrollPane = new PScrollPane (canvas)

 In the above code snippet, templatePanel is a JPanel to which my tabbed pane has been added.

 Martin

回覆所有人
回覆作者
轉寄
0 則新訊息