While you are developing your visual class, you can run
it to test its appearance and behavior.
About this task
When you run a Java™ bean
or application using the visual editor, a virtual machine is created
that uses the class path specified in the Java Build Path of the project. The Java bean is then instantiated using its null
constructor.
- If the Java bean is a visual
class (is a subclass of java.awt.Component),
an appropriate window is created to host the visual Java bean.
- If the bean is part of or inherits from an AWT Java bean, the window is a java.awt.Dialog.
- If the bean is a Swing class or inherits from a Swing class, the
window is a javax.swing.JDialog.
- If the bean is an SWT class, the window is an SWT Shell. If the
visual Java bean does not require
a window because it itself is one, the Java bean
will be made visible and given a default size after it has been instantiated.
When you run a class as a Java bean
or application, a launch configuration is automatically created. The
launch configuration is used to start a virtual machine that instantiates
the class and allows it to be tested. If a launch configuration exists
for the class you are running, that launch configuration is used.
To
run a visual class as a Java bean
or application: