Revision: 891
Author: allain.lalonde
Date: Thu Nov 12 07:02:39 2009
Log: Changed the Canvases to have preferred size rather than the Container.
http://code.google.com/p/piccolo2d/source/detail?r=891

Modified:
   
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/pswing/MultiplePSwingCanvasesExample.java

=======================================
---  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/pswing/MultiplePSwingCanvasesExample.java
       
Thu Nov  5 08:38:23 2009
+++  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/pswing/MultiplePSwingCanvasesExample.java
       
Thu Nov 12 07:02:39 2009
@@ -53,11 +53,13 @@
          container.setLayout(new BorderLayout());

          PSwingCanvas canvas1 = buildPSwingCanvas("Canvas 1", Color.RED);
+        canvas1.setPreferredSize(new Dimension(350, 350));
          container.add(canvas1, BorderLayout.WEST);
+
          PSwingCanvas canvas2 = buildPSwingCanvas("Canvas 2", Color.BLUE);
-        container.add(canvas2, BorderLayout.EAST);
-
-        container.setPreferredSize(new Dimension(700, 350));
+        container.add(canvas2, BorderLayout.EAST);
+        canvas2.setPreferredSize(new Dimension(350, 350));
+
          frame.pack();
          frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
          frame.setVisible(true);

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to