Close awt window by clickin on cross

hi java world out there...i ve made my first program of java ever..but i dont know how to close it by clicking on the cross in the upper right hand corner of the window...
any one plese tell me the code...
thanaks
pinky

Put this in the class that extends Frame
addWindowListener(new WindowAdapter()
       public void windowClosing(WindowEvent wvt)
     System.exit(0);
});

Similar Messages

  • Getting hang/crash problem when I try to close browser window from applet

    I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded.
    The Applet window is a PopUp window from one of my application's window. First time I start my application and load that Applet the button works fine. It calls the Javascript method and the Method closes the window using the self.close() method.
    But now if I open the applet window again and click on the button to close the windows, it hangs. I put in trace statements and saw that it hangs on JSObject.getWindow() window.
    I am using JDK Plugin 1.4.2_07 and 5.0 , if I work out on IE browser, it works fine.But when I use firefox or mozilla it gives problem of hanging/crashing.
    Note that in case of 1.4.2_07 this problem experienced some times but in case of 5.0 it gives always for other than IE browser.
    Please, if somebody could give me some clue about why this would happen, I will really appreciate that. and code related to this is given below
    import javax.swing.JApplet;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import netscape.javascript.JSObject;
    public class TestApplet extends JApplet implements ActionListener{
    protected JButton closeButton = null;
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    this.closeButton = new JButton("Close Browser Window");
    this.add(this.closeButton);
    this.closeButton.addActionListener(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    alreadyClosed = true;
    TestApplet.this.stop();
    frame.show();
    public void actionPerformed(ActionEvent ae){
    stop();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    frame.dispose();
    closeLaunchedBrowser();
    System.gc();
    System.runFinalization();
    private void closeLaunchedBrowser() {
    final TestApplet thisObject = this;
    Runnable r = new Runnable() {
    public void run() {
    try {
    JSObject win = (JSObject)JSObject.getWindow(thisObject);
    if (win != null && win.toString() != null) {
    //win.eval("top.opener=self;self.close();");
    //win.call("close", null);
    win.eval("self.close();");
    } catch (Exception e) {
    Thread t = new Thread(r);
    t.start();
    Thanks.

    I am waiting for any reply. I have tried for all these below options still I am getting Problem. I heard this is because of javascript, it wont call methods more times .Thats
    why I need other than JSObject or java script solution.If some one know anything about this or any modifications I have to made for the below options to avoid that problem please let me know.
    // URL durl = new URL(thisObject.getCodeBase(), "test/CloseMe.htm");
    // System.out.println("URL :" + durl.toString());      
    // thisObject.getAppletContext().showDocument(durl);
    //     thisObject.getAppletContext().showDocument(new URL("javascript:window.close();"), "_self");
    //win.eval("top.opener=self;top.close();");
    //win.call("close", null);
    //Object[] args = { "close", new Integer(50) };
    // win.call("setTimeout", args);
    //win.eval("setTimeout("close", new Integer(50));");
    If it is the problem of JRE I just need it should work on 1.4.2_01 or higher.
    thanks.

  • SQL Developer 1.5.1 does not close from Windows Task Mgr

    I am not sure why but ever since I have upgraded to 1.5.1, when I close SQL Dev, the window GUI goes away but I see sqldeveloper.exe in the task manager. This drove me crazy because I was first fighting the problem where my connections got lost (thank goodness I always backup my install directory before upgrading due to the numerous upgrade problems).
    I am also having problems saving any preferences. I cannot tell it to skip the tips at startup, change the system theme, etc. This may be due to the fact that I have to kill the app in the task manager after I perform a Menu Exit within Oracle SQL Developer.
    I don't know but hopefully you guys will have gone through this.
    One other, hmmmm, rant if I may.
    Why is it that updates/upgrades of this application are such a PIA? I realize it is free but a guy can only take so much before just scraps passes on a piece of software and goes els were.
    Thanks in advance...
    Tom

    Here's the dump. A lot of information. I hope it provides a clue.
    WARNING: Unknown directive: ;IncludeConfFile
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.jar!/META-INF/extension.xml:15: Duplicate declaration of addin oracle
    .dbtools.migration.workbench.core.MigrationAddin. Previously defined in extensio
    n oracle.sqldeveloper.migration
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.thirdparty.sqlserver.jar!/META-INF/extension.xml:13: Duplicate declaration
    of addin oracle.dbtools.thirdparty.sqlserver.SQLServerBrowserAddin. Previously
    defined in extension oracle.dbtools.thirdparty.sqlserver
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.snippet.jar!/META-INF/extension.xml:15: Duplicate declaration of addin ora
    cle.dbtools.raptor.snippet.SnippetAddin. Previously defined in extension oracle.
    dbdev.snippet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.snippet.jar!/META-INF/extension.xml:16: Duplicate declaration of addin ora
    cle.dbtools.raptor.snippet.SaveSnippetAddin. Previously defined in extension ora
    cle.dbdev.snippet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .thirdparty.access.jar!/META-INF/extension.xml:13: Duplicate declaration of addi
    n oracle.dbtools.thirdparty.access.AccessBrowserAddin. Previously defined in ext
    ension oracle.sqldeveloper.thirdparty.access
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:12: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer7Plugin. Previou
    sly defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:13: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer2000Plugin. Prev
    iously defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.migration.sqlserver2005.jar!/META-INF/extension.xml:14: Duplicate declarat
    ion of addin oracle.dbtools.migration.workbench.plugin.SQLServer2005Plugin. Prev
    iously defined in extension oracle.dbtools.migration.sqlserver2005
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:13: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQLPlugin. Previously defined in ex
    tension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:14: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQL4Plugin. Previously defined in e
    xtension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.mysql5.jar!/META-INF/extension.xml:15: Duplicate declaration of addin
    oracle.dbtools.migration.workbench.plugin.MySQL5Plugin. Previously defined in e
    xtension oracle.sqldeveloper.migration.mysql5
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .migration.msaccess.jar!/META-INF/extension.xml:12: Duplicate declaration of add
    in oracle.dbtools.migration.workbench.plugin.MSAccessPlugin. Previously defined
    in extension oracle.sqldeveloper.migration.msaccess
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.dbtools
    .sqlworksheet.jar!/META-INF/extension.xml:12: Duplicate declaration of addin ora
    cle.dbtools.sqlworksheet.sqlview.SqlEditorAddin. Previously defined in extension
    oracle.sqldeveloper.sqlworksheet
    Jul 1, 2008 7:43:16 AM javax.ide.extension.ElementVisitor log
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/sqldeveloper/extensions/oracle.sqldeve
    loper.thirdparty.mysql.jar!/META-INF/extension.xml:12: Duplicate declaration of
    addin oracle.dbtools.thirdparty.mysql.MySQLBrowserAddin. Previously defined in e
    xtension oracle.dbtools.thirdparty.mysql
    Jul 1, 2008 7:43:17 AM oracle.ideimpl.extension.WarnAboutDisabledExtensionsAddin
    logDisabledExtensions
    SEVERE: jar:/file:/C:/oracle/sqldeveloper/jdev/extensions/oracle.ide.xmlef.jar!/
    META-INF/extension.xml:0: Not loaded: Missing dependencies: oracle.ide.daf, orac
    le.ide.palette2
    Addin: Translator PlSql is trying to register a input type (.plsql) which confli
    cts with translator PlSql who already using this input type
    Exception initializing 'oracle.jdevimpl.runner.profile.ProfilerShell' in extensi
    on 'Database Developer': java.lang.NumberFormatException: For input string: "f1_
    prfdprojsetmemory_html"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.valueOf(Integer.java:553)
    at oracle.ide.util.ArrayResourceBundle.getIntegerImpl(ArrayResourceBundl
    e.java:182)
    at oracle.jdevimpl.runner.profile.ProfArb.getInteger(ProfArb.java:66)
    at oracle.jdevimpl.runner.profile.ProfilerShell.createRunMenuItem(Profil
    erShell.java:193)
    at oracle.jdevimpl.runner.profile.ProfilerShell.createMenus(ProfilerShel
    l.java:175)
    at oracle.jdevimpl.runner.profile.ProfilerShell.initialize(ProfilerShell
    .java:166)
    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManage
    rImpl.java:405)
    at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManag
    erImpl.java:214)
    at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(Ad
    dinManagerImpl.java:128)
    at oracle.ide.IdeCore.initProductAndUserAddins(IdeCore.java:1804)
    at oracle.ide.IdeCore.startupImpl(IdeCore.java:1481)
    at oracle.ide.Ide.startup(Ide.java:662)
    at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
    at oracle.ideimpl.Main.start(Main.java:110)
    at oracle.ideimpl.Main.main(Main.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.ide.boot.PCLMain.callMain(PCLMain.java:66)
    at oracle.ide.boot.PCLMain.main(PCLMain.java:58)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.classloader.util.MainClass.invoke(MainClass.java:128)
    at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
    190)
    at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
    at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
    at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.ide.boot.Launcher.invokeMain(Launcher.java:729)
    at oracle.ide.boot.Launcher.launchImpl(Launcher.java:115)
    at oracle.ide.boot.Launcher.launch(Launcher.java:68)
    at oracle.ide.boot.Launcher.main(Launcher.java:57)
    oracle.xml.parser.v2.XMLParseException: Start of root element expected.
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidati
    ngParser.java:345)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingP
    arser.java:307)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:298)
    at oracle.dbtools.raptor.utils.AbstractFolderedXml.processXML(AbstractFo
    lderedXml.java:70)
    at oracle.dbdev.oviewer.base.ViewerAddin.loadXMLEditors(ViewerAddin.java
    :198)
    at oracle.dbdev.oviewer.base.ViewerAddin$1.addinsLoaded(ViewerAddin.java
    :117)
    at oracle.ide.IdeCore.fireIdeEvent(IdeCore.java:843)
    at oracle.ide.IdeCore.mav$fireIdeEvent(IdeCore.java:124)
    at oracle.ide.IdeCore$3.run(IdeCore.java:815)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Could not load:oracle.dbtools.thirdparty.mysql
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):
    "Keep-Alive-Timer" daemon prio=8 tid=0x05663610 nid=0x398 waiting on condition [
    0x05e0f000..0x05e0fae8]
    at java.lang.Thread.sleep(Native Method)
    at sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:149)
    at java.lang.Thread.run(Thread.java:595)
    "pool-1-thread-1" prio=6 tid=0x05658c00 nid=0x1304 waiting on condition [0x05bcf
    000..0x05bcfb68]
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
    .await(AbstractQueuedSynchronizer.java:1767)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.jav
    a:359)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.ja
    va:470)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:674)
    at java.lang.Thread.run(Thread.java:595)
    "Native Directory Watcher" prio=2 tid=0x00a056c0 nid=0x16b4 runnable [0x0563f000
    ..0x0563fa68]
    at oracle.ide.natives.NativeHandler.enterWatcherThread(Native Method)
    at oracle.ide.natives.NativeHandler$2.run(NativeHandler.java:252)
    at java.lang.Thread.run(Thread.java:595)
    "IconOverlayTracker Timer" prio=6 tid=0x009d71f0 nid=0x15ec in Object.wait() [0x
    0516f000..0x0516fb68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x12ee5448> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x12ee5448> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "IconOverlayTracker Timer" prio=6 tid=0x009ce7f0 nid=0xc4c in Object.wait() [0x0
    4f6f000..0x04f6fc68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x12e6e6c8> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x12e6e6c8> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "TimerQueue" daemon prio=6 tid=0x00946e70 nid=0xd80 in Object.wait() [0x043cf000
    ..0x043cfd68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1289c378> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(TimerQueue.java:233)
    - locked <0x1289c378> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-EventQueue-0" prio=6 tid=0x0093f460 nid=0xcd0 in Object.wait() [0x0428f000.
    .0x0428f9e8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ac20> (a java.awt.EventQueue)
    at java.lang.Object.wait(Object.java:474)
    at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
    - locked <0x1283ac20> (a java.awt.EventQueue)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:189)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "AWT-Windows" daemon prio=6 tid=0x0093ae70 nid=0x121c runnable [0x0408f000..0x04
    08fae8]
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:269)
    at java.lang.Thread.run(Thread.java:595)
    "AWT-Shutdown" prio=6 tid=0x00939450 nid=0xdf4 in Object.wait() [0x03f8f000..0x0
    3f8fb68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ada8> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:474)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x1283ada8> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:595)
    "Java2D Disposer" daemon prio=6 tid=0x009384f0 nid=0x16c0 in Object.wait() [0x03
    e8f000..0x03e8fbe8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1283ae30> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x1283ae30> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:107)
    at java.lang.Thread.run(Thread.java:595)
    "Low Memory Detector" daemon prio=6 tid=0x009200d0 nid=0x828 runnable [0x0000000
    0..0x00000000]
    "CompilerThread0" daemon prio=6 tid=0x0091f580 nid=0xfdc waiting on condition [0
    x00000000..0x0354f6cc]
    "Signal Dispatcher" daemon prio=6 tid=0x0091e3b0 nid=0x584 waiting on condition
    [0x00000000..0x00000000]
    "Finalizer" daemon prio=8 tid=0x0091d950 nid=0x176c in Object.wait() [0x0334f000
    ..0x0334fa68]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x127d01f8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x127d01f8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=6 tid=0x0091c5a0 nid=0x17c in Object.wait() [0x0
    324f000..0x0324fae8]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x127d0070> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:474)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x127d0070> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x009135b0 nid=0xc68 waiting on condition [0x00000000..0x0013f
    b70]
    "VM Thread" prio=6 tid=0x0091b8b0 nid=0x179c runnable
    "VM Periodic Task Thread" prio=6 tid=0x009232a0 nid=0x1490 waiting on condition

  • How to recognise that user wants to close vi-window?

    Hello,
    i have VI with a while-loop. The loop can be stopped by pressing a true/false-Button on the front-panel.
    If the user closes the Vi-Window by clicking on th cross [X] in the topper right  (the standard
    button next to minimize, maximize) the the loop is of course also stopped.
    Is it possible to get this [X]-cklick and NOT to close the window but doing something in the VI
    after knowing that the [X] was clicked?
    Thanks for your help.
    Message Edited by NewOne on 09-22-2005 03:34 AM

    The "event Filter Node" which in fact contains the "discard" option
    will only show up for filter events. these are marked by a red arrow
    infront and, at least in LV 7.1, a "?" behind the event-name. "normal"
    notify events have green arrows and no "?" in the end.
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Close browser window of mozilla Firefox with popup message in ADF

    below code is working in "Internet Explorer " browser but I want to excute this on "mozilla Firefox" browser with popup message when I click on browser cross Cancel button in ADF. Please help me how can I achieve this ?
    <af:resource type="javascript">
    function closeWindow(event){
    window.opener = self;
    window.close();
    </af:resource>

    Hi,
    thats not possible...
    you can't close the parent browser window(except IE).. you can only close the window that is opened by you... with window.open('');

  • How to close a window from program?

    How do I programmatically close a window so that the windowClosing() event is fired? I can't seem to find example code anywhere.
    Thanks, Brad

    Hi Brad,
    This is just a suggestion (I haven't tried it myself), but perhaps the "java.awt.Robot" class can help?
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Robot.html
    Good Luck,
    Avi.

  • How to close ie window?

    hi,
    i need to write a program that could open and close a particular url in ie browser for a particular number of times. i could open the browser using following code
    cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    Process p = Runtime.getRuntime().exec(cmd);but i could not find how to close the window - please help

    p.destroy()... but how do you decide when to destroy the process -- are you using a timer or whuh?
    By the way, if you just want to open a browser in a platform independent way, you could try the new Desktop [browse |http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)] method.

  • IMessage beta loose all saved conversations when I open and close a window.

    iMessage beta looses all saved conversations when I open and close a window.
    Just reporting this bug... Could not find anyother place to do it.
    Jonathan

    I thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.

  • When I am downloading anything from any website in firefox and if I close main window of firefox, the downloading file also gets stops and crashes.

    example, I was downloading 74 mb file and as soon as I close firefox window my 74 mb file was downloaded to that size upto which it has been downloaded say 1 Mb for example..

    You can set the pref browser.download.manager.quitBehavior to 2 on the about:config page.<br />
    That will make Firefox ask for confirmation if you want to cancel the download if you close Firefox.
    See:
    * http://kb.mozillazine.org/browser.download.manager.quitBehavior
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • How do I open with one click all the windows that I have been minimized? When I right click on the lower bar Firefox icon, I only see the option to close all windows.

    It is used to be that I could right click on the Firefox icon on the toolbar at the bottom of the screen and I would then be given the option to open all windows. Now I only see the option to close all windows. The ability to open all windows is very useful. Have you eliminated this capability? It was a very helpful feature because I often have more than 15 windows minimized at one time. On a regular basis I like to open them all and keep only the ones that I still need. I know that it is possible to see the name of each window that is minimized by moving my cursor over the Firefox icon, but this does not provide enough information. So I have to open each window one at a time to look at it and then decide to close it or keep it - this is a frustrating, time-consuming process. Is there another way to open all the minimized windows at the same time, instead of one at a time?

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    You can retrieve the certificate and check details like who issued certificates and expiration dates of certificates.
    * Click the link at the bottom of the error page: "I Understand the Risks"
    Let Firefox retrieve the certificate: "Add Exception" -> "Get Certificate".
    * Click the "View..." button and inspect the certificate and check who is the issuer.
    You can see more Details like intermediate certificates that are used in the Details pane.

  • Firefox closes existing window when you open and close a new window

    When I'm using firefox and need to open a new window (or a website opens a new window) and I'm done with that new window and close it, Firefox attempts to also close the previous window that I am using. I've tried reinstalling, but other than that I don't know what to do. What usually happens when I close the window is that I have multiple tabs open in the other one and it asks me if I would like to close all my tabs. When I hit cancel, it asks me again. Once I hit cancel the second time it stops bothering me.

    I thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.

  • Every time I close a window that has opened up (not a tab) all the open windows close and it's driving me nuts!

    If I have opened up a link and it comes up as a separate window and not a tab, then I go to close that window, all the other Firefox windows that are open will close too. Is there anything to prevent this? It is extremely annoying when I have to go and open all the windows/tabs again!
    == This happened ==
    Every time Firefox opened
    == since upgrading

    Do you have that problem when running in the Firefox SafeMode?
    [http://support.mozilla.com/en-US/kb/Safe+Mode]
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this:
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • W/zoteroinstalledwedo a window,open() followed by a window.close() in tha window. Zotero remains and the window is still open. How do I close the window with zotero present in FF w/o disabling zotero?

    the js function to window.open() is in pageAA on a tab.
    We click the form or link to open the popup to run a video.
    We have a close button on the popup window.
    When that is clicked the window.close() js is executed on that page leaving Zotero present and the popup still open.
    We've tried using close() window.close() name.window.close() and
    all fail the same way.
    Short of disabling Zotero is there a way to close the popup in FF and any other addons with one shot?

    Thank's but still no fix.
    In safe mode everything works.
    Without Zotero - everything works.
    When the popup is loaded with Zotero, the tab shows a constant "Loading" with the circular in process icon.
    The Zotero icon shows to the left of the tab.
    If I right click on Zotero and close it, the close() js works properly
    Is there a way to do a window.open() with:
    A. no tabs -or-
    B. block all add on's -or-
    C. to kill an add on
    before doing the close()?

  • Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?

    Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?  I have a hand condition at the moment that makes it painful to mouse the cursor over to the arrow and click it (for instance, in the sidebars for Finder or iTunes) to open or close a folder.  If anyone knows a keyboard shortcut for this, I'd really appreciate it--thanks!

    OS X keyboard shortcuts

  • HTML-DB OAE Javascript to close current window and open a new window

    Hi everybody,
    We work with 1.6.
    What we want is to close the current window and open a new window with the URL mentionned in the window.open('http://www.cf.qc/pls/portal/PORTAL.....,'newwindow').
    The new window opening fires only once although we call it many times.
    Our javascript is:
    function closeTest()
    { alert('closeTest');
    if('&REQUEST.'=='QUITTER2'){     
    w = window.self;
    w.opener = w;
    w.close();
    window.open('http://www.cf.qc/pls/portal/PORTAL.home','newwindow','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
    We call it on our application attributes :
    OnLoad="closeTest()"
    Thanks. Bye.

    Try this on for size:
    I have included two functions.
    windowRebuild() - opens a new window, maximizes it based on the screen size, removes all toolbars, and then closes the old window.
    myLocation(appName, pageName) - builds a url referencing an HTMLDB application, specfic to what server you are currently on. Very useful when you have an application on 3 different servers(dev, test, prod servers), you wouldn't want the server name hardcoded if you plan to export the app to another server.
    Also, you need to be careful when using &APP_ID. I am not completely certain how that is resolved at runtime, but I've found it only works when the javascript is in the HTML Header of a page and not stored in the template of the page.
    <script language="JavaScript1.1" type="text/javascript">
      This functions is for internal application use.
      Examples of myLocation:
      url = myLocation('&APP_ID.', 'APP_PUBLIC_PAGE');
      url = myLocation('MY_APP_ALIAS', 'MY_PAGE_ALIAS');
      url = myLocation('184', '10');
    function myLocation(myApp, myPage){
      var myHost = location.host;
      var newURL;
      newURL = 'http://'+myHost+'/pls/htmldb/f?p='+myApp.toString()+':'+myPage.toString();
      return newURL;
    /*  Function windowRebuild()
    *   This function will open a new window and close the old window.
    *   This function will also maximize the new window and remove all toolbars.
    function windowRebuild(){
       if(window.name != 'myAppWin'){
        var url = myLocation('&APP_ID.', 'PAGE_ALIAS');
        var myWin = window.open(url,'myAppWin','toolbar=0,scrollbars=1,menubar=0,status=1,resizable=1,location=0');
        window.opener = 'x';
        window.close();
       if(window.name == 'myAppWin'){
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth,screen.availHeight);
    </script>Let me know if that works or you need some more explanation.
    Chris

Maybe you are looking for