My application runs when I open it to Visual Composition! What's happening?

Scott Stanchfield

When you open a class to the Visual Composition Editor (VCE), it executes the class' initialize() method. If you're seeing your application appear when you open to the VCE, it is almost a sure thing that you've added code to show()/setVisible(true) your class in your initialize() method or constructor.

When you write applications, put the setVisible(true) call in your main() method, not in your initialize() method.


See also