Comment #1 on issue 73 by mr0...@mro.name: Helloworld from piccolo2d.org  
relies on piccolox
http://code.google.com/p/piccolo2d/issues/detail?id=73

I'll suggest this code as basic Hello-World example (and weave it into the  
website):

import javax.swing.JFrame;

import edu.umd.cs.piccolo.PCanvas;
import edu.umd.cs.piccolo.nodes.PText;

public class HelloPiccolo2d extends JFrame {

     private static final long serialVersionUID = 7325281186388356689L;

     public static void main(final String[] args) {
         final JFrame me = new HelloPiccolo2d();
         me.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         me.setSize(200, 50);
         me.setVisible(true);
     }

     private HelloPiccolo2d() {
         final PCanvas canvas = new PCanvas();
         final PText text = new PText("Hello World");
         canvas.getLayer().addChild(text);
         this.add(canvas);
     }
}


--
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:
http://code.google.com/hosting/settings

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

Reply via email to