import java.awt.*; import adm.*; /** * This application extends CSingletonApplication class. * It has a null constructor and a main method. It don't overwrite * setArgs method since it takes no arguments. * The static method invoke provided by CSingletonApplication * takes care all the book keep work to allow only one instance * of this class running in a same virture mechine. */ public class SingletonApp extends CSingletonApplication { /** * Only need to call parent class invoke. The first argument * for invoke is the name of this application. The secone one * is the args array. It can be null when no args. */ public static void main (String [] args) { CSingletonApplication.invoke("SingletonApp", null); } /** * A null constructor (must provide) */ public SingletonApp () { CLabel L = new CLabel("R121", "GSET"); L.setColorMode(CConstants.CLRMOD_ALARM); add(L); setBounds(20, 100, 100, 50); } }