Jframe window not closing

Hi can anyone plz tell me how i will close my jframe window..
I have a button called EXIT,clicking which i want to close my Frame...
I am writiing setvisible(false) but thats not working..

use
System.exit(0);
All the best

Similar Messages

  • 2nd Document window not closing

    I have 2 Document windows,
    - win1 is parent window.
    - win2 is a small window with 3 display fields
    and 2 buttons OK & Cancel.
    - other setting for 'win2' is
    Modal = 'YES'
    Close Allowed = 'YES'
    i have problem with Cancel button code, i am giving
    if :SYSTEM.EVENT_WINDOW = 'WIN2' then
    GO_ITEM('CTRL.FLD5');
    HIDE_Window('WIN2');
    end if;
    The WIN2 is not closing,
    i am calling this 'WIN2' from a WVI trigger of a field on parent window 'win1'
    by issuing SHow_WINDOW('win2') command.
    but it flashes error FRM-40737: illegal restricted Procedure SET_WINDOW_PROPERTY in WVI trigger.
    Any one please suggest. TY.

    hi Sarah,
    i dont to know to which item's WVI should i atttach this code.
    Since the window Closed_Allowed property is set "yes".
    the same code given at Form-level When-Widow-Closed, works well, closes the window in 1 click.
    but i dont know the same code given for Cancel button, does not close 'win2',
    One more point, first time when win2 is shown, that time, out of the [x] button on the status bar &
    Cancel button on win2, if i use [x] button first, then 'win2' closes and cursor is back in CTRL.FLD5 on 'win1', fair enough.
    then afterwards from CTRL.FLD5 when 'win2' is called again then the Cancel button code works fine just like the [x] button.
    but the question is why not first time, if i choose Cancel button first. why it is required [x] button to be used first.
    So the problems are;
    - FRM-40737 is thrown whenever win2 in invoked from CTRL.FLD5
    - 'WIN2' does not close by pressing Cancel button, when displayed first time.

  • Groups Window not closing like before update 4.3

    After the update to Android 4.3, group windows often don't close after you hit the home button to exit/switch apps.  This behavior is a little annoying.  Is this a bug or working as designed?
    After I switch apps using the home button, I expect the group window I used to launch an app to be closed...I don't expect to press the home button twice.

    If I'm understanding you correctly, I'm experiencing the same thing. It isn't a matter of specific apps, but of the way Android 4.3 now handles folders on Home screens. For instance, I have some folders on my Home screen with quick-dial links. I open the folder, tap a link, and it dials the contact. When I'm done and go back to my Home screen, there the folder is still open. The same thing happens with folders that have apps.
    This is a change made in Android 4.3 in comparison to earlier versions of Android. Many people have commented on this online, most of them as unhappy about it as you and I, kil. (E.g., this post and the ones following it in an Android Central thread.) Unfortunately, there's nothing that can be done about it. Maybe they'll change it back in the next version of Android, maybe not.

  • 'Run' terminal window not closing

    I have an Java application which I have created an installation package for using InstallAnywhere.
    On Solaris when launching the application using the alias from a terminal window it works fine. But, when I launch the application from the File Manager, by double-clicking, it creates an 'extra' terminal window called 'Run', this terminal window doesn't terminate when I exit my application.
    How can I prevent this, can I prevent the 'Run' window from starting using some sort of setting, or can I somehow make sure it is closed togheter with the application?
    On Linux (SuSE10) the OS asks how I would like to run my application so I don't have the same problem there.

    Hi Kanwalpreet
    For basic idea please refer to the following link
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Dialog Boxes in WebDynpro</a>
    Go Through <b>page 16</b> of the PDF Document
    Regards
    Chaitanya.A

  • Window not closing

    In one of my views i have a button...when i press that a window opens up with a drop down list.......when i select a value from the drop down n press ok it throws an exception....
       com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Tried to close window ID MPCELLJBfa title Select a Reason, but was not on top of the queue. Top window ID MPCEf7 title Docket Details!
        at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.popModalWindow(ApplicationWindow.java:161)
        at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doClose(WebDynproWindow.java:398)
        at com.sap.tc.webdynpro.clientserver.window.Window.doClose(Window.java:153)
        at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:270)
        at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:237
    what cud b the way out...
    null

    Hi Kanwalpreet
    For basic idea please refer to the following link
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Dialog Boxes in WebDynpro</a>
    Go Through <b>page 16</b> of the PDF Document
    Regards
    Chaitanya.A

  • Windows not closing in safari

    whenever I use safari and try to close a window, the red x button does not work. What can I do? Please HELP ME!!!!!
    ibook g4   Mac OS X (10.4.5)  

    Hi hulkman,
    Have a search of the forums (search box in the top right hand corner of the window) - this issue has been mentioned a few times already so hopefully those posts will tell you how to fix things.

  • About window not closing

    When I go into the about window for Adobe Reader X it shows the relevant paces and I have version 10.1.11. I am then unable to close the window by selecting the red cross and the window just stays. The only way I can close the window is going into to taskmanager and closing the program

    YOUR RIGHT. Worked first time. Thanks
    On Wed, Sep 24, 2014 at 2:43 PM, Pat Willener <[email protected]>

  • Dialog/Frame window not closing

    I have an instruction dialog that pops up in an application, but if the close (X) is pressed it doesn't close the dialog/Frame.
    Dimension dem = getSize();
                   Frame r = new Frame();                    
                   Dialog d = new Dialog(r);
                   TextArea t = new TextArea("",100,100,TextArea.SCROLLBARS_NONE);
                   t.setBackground(new Color(0,0,102));
                   t.setForeground(Color.white);
                   t.setFont(new Font("Helvetica",6,14));
                   t.append(
                        "Grammar Checking Instructions: "+"\n\n"+
                        " -Use the Lexicon provided to creates a sentence for grammatical"+"\n"+
                        " checking."+"\n"+
                        " -The sentence can be typed in the text field provided or the user can"+"\n"+
                        " load a sentence from a file. (*.txt format)"+"\n"+
                        " -Press the 'Check Sentence' button for the sentence to be analyzed"+"\n\n"+
                        "Grammar Rules: "+"\n\n"+
                        " S -> NP Pred"+"\n"+
                        " Pred -> v NP PP | v PP NP | v NP | v PP | v"+"\n"+
                        " PP -> p NP"+"\n"+
                        " NP -> det. NP* | NP*"+"\n"+
                        " NP* -> adj NP* | n");
                   d.add(t);
                   d.setTitle("Grammar Checking");
                   d.setSize(475,300);
                   d.setLocation(dem.height/2 -140,dem.width/2 -40);
                   d.setResizable(false);
                   d.show();
                   r.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}});     
    thanks for the help,
    steve

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
      JDialog myDialog;
      public Test() {
        myDialog = new JDialog(this,"Sample Dialog");
        myDialog.setSize(50,50);
        myDialog.getContentPane().add(new JLabel("Hello"));
        JPanel content = (JPanel)getContentPane();
        JButton myButton = new JButton("Dialog");
        content.add(myButton);
        myButton.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
         myDialog.show();
        addWindowListener(new WindowAdapter() {
          public void windowClosed(WindowEvent e) { System.exit(0); }
      public static void main(String[] args) {
        Test test = new Test();
        test.setSize(100,100);
        test.show();
    }

  • Firefox.exe*32 not closing down when i sutdown all open windows so I have to close it through taskmanager

    firefox.exe*32 not closing down when i sutdown all open windows so I have to close it through taskmanager so I can then start a new session.

    See:
    *"Hang at exit": http://kb.mozillazine.org/Firefox_hangs
    *"Firefox hangs when you quit it": https://support.mozilla.org/kb/Firefox+hangs

  • How do I selectivly close the only not responding window (without closing the other 3 responding windows)

    Presently, I have 4 windows opened, each with a bunch of tabs.
    Since I restarted firefox this morning, one out these 4 windows, keeps on not displaying.
    How do I selectivly close this only window (without closing the 3 others windows)

    Here is what the manpage shows:
    [ps(1)|http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/p s.1.html]
    state The state is given by a sequence of letters, for example, ``RWNA''. The first letter indicates the run
    state of the process:
    I Marks a process that is idle (sleeping for longer than about 20 seconds).
    R Marks a runnable process.
    S Marks a process that is sleeping for less than about 20 seconds.
    T Marks a stopped process.
    U Marks a process in uninterruptible wait.
    Z Marks a dead process (a ``zombie'').
    Additional characters after these, if any, indicate additional state information:
    + The process is in the foreground process group of its control terminal.
    < The process has raised CPU scheduling priority.
    <div class="jive-quote"> The process has specified a soft limit on memory requirements and is currently exceeding that
    limit; such a process is (necessarily) not swapped.
    A the process has asked for random page replacement (VA_ANOM, from vadvise(2), for example,
    lisp(1) in a garbage collect).
    E The process is trying to exit.
    L The process has pages locked in core (for example, for raw I/O).
    N The process has reduced CPU scheduling priority (see setpriority(2)).
    S The process has asked for FIFO page replacement (VA_SEQL, from vadvise(2), for example, a large
    image processing program using virtual memory to sequentially address voluminous data).
    s The process is a session leader.
    V The process is suspended during a vfork.
    W The process is swapped out.
    X The process is being traced or debugged.

  • How to fix alt f4 not closing window

    how to fix alt f4 not closing window if watching video unless you off click out of the video, does not happen in IE ?

    Add:
    $objForm.add_FormClosing({$_.Cancel=$true})
    [void] $objForm.ShowDialog()
    Add:
    $OKButton.Add_Click({$x=$objTextBox.Text;$objForm.Add_FormClosing({$_.Cancel=$false});$objForm.Close()})

  • R12: AP Tax Code window not getting closed

    Hi,
    When ever I open tax code window in AP(Payables>Setup>Tax>Tax Code) I cant able to close the tax code window, window gets hang, I didnt find any other way to close the window except closing the entire application.
    We have recently migrated to 12.0.6 from 11.5.10.2
    Please suggest to resolve this issue
    Regards
    Naga

    Have you applied the latest CPCs ? See MOS Doc 557869.1 (EBS: R12 Oracle Financials Critical Patches) - these patches are mandatory. If you have, pl open an SR so Support can troubleshoot. Did this ever work correctly - if so what changes have been made recently ?
    HTH
    Srini

  • In Unix, main JFrame focus not regained after modal dialog exit.

    Hi all,
    I'm new to this forum so hopefully this is the right place to put this question.
    I have a relatively simple GUI application written in Java 6u20 that involves a main gui window (extends JFrame). Most of the file menu operations result in a modal dialog (either JFileChooser or JOptionPane) being presented to the user.
    The problem is that when running on Unix (HPUX), the process of changing focus to one of these modal dialogs occasionally results in a quick flash of the background terminal window (not necessarily that used to launch the Java), and the process of closing the modal dialogs (by any means, i.e. any dialog button or hitting esc) doesn't always return focus to the main extended JFrame object, sometimes it goes to the terminal window and sometimes just flashes the terminal window before returning to the main JFrame window.
    I think the problem is with the Unix window manager deciding that the main focus should be a terminal window, not my Java application, since the problem occurs in both directions (i.e. focus from main JFrame to modal dialog or vice versa).
    In most cases of JOptionPane, I DO specify that the main extended JFrame object is the parent.
    I've tried multiple things since the problem first occured, including multiple calls to a method which calls the following:
    .toFront();
    .requestFocus();
    .setAlwaysOnTop(true);
    .setVisible(true);
    ..on the main JFrame window (referred to as a public static object)...
    just before and after dialog display, and following selection of any button from the dialogs. This reduced the frequency of the problem, but it always tends to flash the terminal window if not return focus to it completely, and when it occurs (or starts to occur then gets worse) is apparently random! (which makes me think it's an OS issue)
    Any help appreciated thanks,
    Simon
    Self-contained compilable example below which has the same behaviour, but note that the problem DOESN'T occur running on Windows (XP) and that my actual program doesn't use auto-generated code generated by a guibuilder:
    * To change this template, choose Tools | Templates 
    * and open the template in the editor. 
    package example;  
    import javax.swing.JOptionPane;  
    * @author swg 
    public class Main {  
         * @param args the command line arguments 
        public static void main(String[] args) {  
            java.awt.EventQueue.invokeLater(new Runnable() {  
                public void run() {  
                    new NewJFrame().setVisible(true);  
    class NewJFrame extends javax.swing.JFrame {  
        /** Creates new form NewJFrame */ 
        public NewJFrame() {  
            initComponents();  
        /** This method is called from within the constructor to 
         * initialize the form. 
         * WARNING: Do NOT modify this code. The content of this method is 
         * always regenerated by the Form Editor. 
        @SuppressWarnings("unchecked")  
        // <editor-fold defaultstate="collapsed" desc="Generated Code">  
        private void initComponents() {  
            jMenuBar1 = new javax.swing.JMenuBar();  
            jMenu1 = new javax.swing.JMenu();  
            jMenuItem1 = new javax.swing.JMenuItem();  
            jMenu2 = new javax.swing.JMenu();  
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);  
            jMenu1.setText("File");  
            jMenuItem1.setText("jMenuItem1");  
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {  
                public void actionPerformed(java.awt.event.ActionEvent evt) {  
                    jMenuItem1ActionPerformed(evt);  
            jMenu1.add(jMenuItem1);  
            jMenuBar1.add(jMenu1);  
            jMenu2.setText("Edit");  
            jMenuBar1.add(jMenu2);  
            setJMenuBar(jMenuBar1);  
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());  
            getContentPane().setLayout(layout);  
            layout.setHorizontalGroup(  
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)  
                .addGap(0, 400, Short.MAX_VALUE)  
            layout.setVerticalGroup(  
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)  
                .addGap(0, 279, Short.MAX_VALUE)  
            pack();  
        }// </editor-fold>  
        private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {  
            int result = JOptionPane.showConfirmDialog(this, "hello");  
        // Variables declaration - do not modify  
        private javax.swing.JMenu jMenu1;  
        private javax.swing.JMenu jMenu2;  
        private javax.swing.JMenuBar jMenuBar1;  
        private javax.swing.JMenuItem jMenuItem1;  
        // End of variables declaration  
    }

    It won't comfort you much, but I had similar problems on Solaris 10, and at the time we traked them down to a known bug [6262392|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6262392]. The status of this latter is "Closed, will not fix", although it is not explained why...
    It's probably because the entry is itself related to another, more general, bug [6888200|http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=b6eea0fca217effffffffe82413c8a9fce16?bug_id=6888200], which is still open.
    So it is unclear whether this problem will be worked upon (I suspect that yes) and when (I suspect that... not too soon, as it's been dormant for several years!).
    None of our attempts (+toFront(...)+ etc...) solved the issue either, and they only moderately lowered the frequency of occurrence.
    I left the project since then, but I was said that the workaround mentioned in the first bug entry (see comments) doesn't work, whereas switching to Java Desktop instead of CDE reduced the frequency of the issues (without fixing them completely either) - I don't know whether it's an option on HPUX.
    Edited by: jduprez on Jul 9, 2010 11:29 AM

  • All windows are closed automatically

    Hi,
    I installed JDK 1.7.0, I created a custom java application I compiled with apache-ant-1.8.1 and when i run de application the main window are closed after 5 seconds without any user interaction. I think this is a bug of JDK release or some licensing requirements? Anyone know something about this?
    the command:
    java -version
    show:
    java version "1.7.0-ea"
    Java(TM) SE Runtime Environment (build 1.7.0-ea-b112)
    Java HotSpot(TM) Client VM (build 20.0-b01, mixed mode, sharing)
    My:
    JAVA_HOME=C:\Program Files\Java\jdk1.7.0
    PATH=...;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\Java\jdk1.7.0\jre\bin;...
    Thanks,
    Fadel

    kevin,
    you're right, I made a small application with JPanel, JFrame and JLabel and is not closed.
    The code is this:
    package oata;
    import java.awt.*;
    import javax.swing.*;
    public class Ejemplo extends JPanel {
         public static void main (String [] args) {
              JFrame frame = new JFrame ("Ejemplo");
              JLabel jl = new JLabel("Ejemplo JLabel");
              frame.getContentPane().add(jl);
              frame.setSize(180,80);
              frame.setVisible(true);
    But that can be then closes the window in my previous project?

  • Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started. How do I set FF back to open tabs in 1 window

    Tabs only open in a new window. Ctl T opens a new window NOT a new tab help-last update this problem started 2 days ago. How do I set FF back to open tabs in 1 window?
    There is no plus sign and going into optins and changing settings has not worked. I have uninstall FF and reinstall-keeping my personalization-and that was no help.
    Right clicking on FF Icon to open a new tab, or going up to FF drop down tab and clicking on new tab both do not work.
    Help everything opens a new window not a new tab. there seems to be no way to reset this or to chose a different optin. I just downloaded new tabs at end addon and it didn't do a thing.

    as a first troubleshooting step - does it work like normally when you open & run firefox in [[Safe Mode|safemode]] by pressing the shift key while you open firefox (all other instances have to be closed before)...

Maybe you are looking for

  • Multiple gamecenter accounts on one apple id

    Before IOS 7 I was able to have multiple gamecenter accounts under one appleID.  One for my phone and anohter for my son on his ipad.  I have not figured out how to get his gamecenter account up and running again without settign up a new apple id, wh

  • How can I change the settings so notes don't sync to my email?

    I don't like how notes always syncs to my email, because it's pretty much send my diary out, even it there's not much stuff there. How do I change the settings so they don't sync? Thanks. It might seem like an obvious question, but I can't find the p

  • ASIO enabled apps seem to be causing popping/crackling in my right channel

    Not 100% sure of this, but I seemed to have narrowed it down to that... let me explain a bit... I have an Audigy 2 Platinum and the four main audio applications I use are Sony's Sound Forge 8.0, Propellerhead's Reason 3.0, Steinberg's Cubase SX, and

  • HP MediaSmart Connect x280n & MP4 Container Audio

    PC Server OS: Windows 7 Home Premium 64-bit SP1 Codecs: Nothing other than installed with Win7 out of the box - all online updates up to date PC Server: HP Entertainment Laptop HP-DV6-6105TX Extender:  HP MediaSmart Connect x280n (Firmware: D2.0.105.

  • Oh yeah, another SYSTEM OVERLOAD thread! Can anyone help please?

    Really? I should be getting constant system overload errors running a dual 2.5Ghz G5 desktop with 2 gigs of RAM, and I'm only running a project with 5 virtual instrument tracks and nothing else? And I froze the four tracks I'm not recording to. I've