1.to create or open a single window check for boolean condition if frame enabledor shown then display your window2.nullpointerexception will be thrown when u refer to a object which is notavailable at runtime.