Status: Accepted
Owner: allain.lalonde
Labels: Type-Defect Toolkit-Piccolo2D.Java Component-Extras OpSys-All  
Milestone-1.3 Priority-Medium Effort-Medium

New issue 148 by allain.lalonde: PSwing nodes doen't handle interactions  
when added to the camera

What steps will reproduce the problem?
The following code demonstrates the problem:

import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JTextField;

import edu.umd.cs.piccolox.pswing.PSwing;
import edu.umd.cs.piccolox.pswing.PSwingCanvas;

public class PSwingCanvasTest {
     public static void main(String[] args) {
         JFrame frame = new JFrame();
         frame.getContentPane().setPreferredSize(new Dimension(600, 600));


     private static PSwingCanvas buildPSwingCanvas() {
         PSwingCanvas canvas = new PSwingCanvas();


         return canvas;

     private static void addCameraPSwing(PSwingCanvas canvas) {
         PSwing swingNode = buildPSwingNode();

     private static void addLayerPSwing(PSwingCanvas canvas) {
         PSwing swingNode = buildPSwingNode();
         swingNode.setOffset(200, 0);

     private static PSwing buildPSwingNode() {
         JTextField textField = new JTextField();
         textField.setPreferredSize(new Dimension(100, 20));
         return new PSwing(textField);

What is the expected output? What do you see instead?
   Both PSwing nodes should allow focus, but only the one on the right does.

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

Piccolo2D Developers Group:

Reply via email to