Frame window closing

Hi friends,
please help me in following situation.
I have a frame1, where i have a button to open new frame2. this frame 2 opens some other frames.
When i close main frame1, i want to trigger a event or execute a method on other frames. i tried window closing and window closed events from frame1 or frame2.
frame2 and frame3 windows r just closing without any events when i close main frame1.
frame2 and frame3 must extend JFrame not JDialog.
thanks,

make in each frame a lille method that calls the next frame (if there is one) and waits until he gets something in return...
so 1 calls 2, 2 calls 3....
3 is the last frame and shuts itself down, but first it returns a value to 2.
then 2 knows it can return a value to 1 and closes itself...
that's the thing i would do... but never tried it yet so dunno about the speed it goes....
leme know if I helped you out.
SeJo

Similar Messages

  • How to tell embedded jinitator applet is still running when window closed

    Hello, we are trying to accomplish the same thing that is mentioned in this post from Metalink. I've searched for a solution and hope someone here can help. Instead of restating the issue I think David Wilson does a good job of explaining what is needed. Can anyone please suggest a possible solution?
    From: David Wilton 07-Oct-05 01:08
    Subject: How to tell embedded jinitator applet is still running when window closed
    How to tell embedded jinitator applet is still running when window closed
    Hi,
    We run an oracle 10g forms application through 9iAS over an intranet. All users are running windows 2000 professional.
    We run separate frame = true but I would like to switch to separate frame = false
    With separate frame = true if the user clicks the outer windows "X" close button (forms mdi window) the user is prompted to save changes before the application ends.
    BUT
    when using separate frame = false
    If the user clicks the upper window "X" button (no longer form mdi window but regular browser window) the window and application is abruptly closed.
    I'm interested in using a onbeforeunload function to confirm if the user wants to close the window. This would be placed in the basejini.htm file. This could always ask if the user wants to exit or not. If they click OK then the window closes but if they click "Cancel" you are returned to the forms application exactly where you left. something like event.returnvalue="do you really want to exit?";
    However if the user exited using the normal exit form method then the applet is already closed before the onbeforeunoad event fires and there is nothing to go back to and I want the window to close automatically. This is accomplished using close.html file in post forms trigger.
    So what I want and what I think many may also want is the check if the embedded applet is still running and if so prompt the user to return to the application or continue to close. Of course If the applet is no longer running then just close because there is no reason confirm closing anymore.
    Does anyone have a html/JavaScript solution that can be placed in the jinitiator.htm file? or similar?
    Thank you
    David
    [email protected]
    From: Andrew Lenton 07-Oct-05 08:58
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I don't know if this is exactly what you are after but you can add the following to the top of your basejini.htm file and it should prompt the user before exiting the IE window.
    <BODY %HTMLbodyAttrs%>
    %HTMLbeforeForm%
    <SCRIPT>
    <!--
    window.onbeforeunload = unloadApplet;
    function unloadApplet(){
    message = "Warning! Please exit the Java Applet prior to
    exiting the browser"
    return message;
    //-->
    </SCRIPT>
    From: Oracle, mohammed pasha 07-Oct-05 09:55
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    David,
    Well I could not understand your complete requirement.
    Refer to Note.201481.1 How to Close the Browser Window When Closing Forms And How to Simulate SeparateFrame By Javascript
    Note.115905.1 How to Close Browser Window When Closing Webforms Applet
    Kind Regards,
    Anwar
    From: David Wilton 07-Oct-05 14:37
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Thank you for your reply and yes you did not understand my question fully.
    Sorry if this is a long reply
    I am able to close the browser window using information in notes 115905.1 and 201481.1, this is not the issue. We implemented this several years ago. It is workable for both separate frame = true or false.
    It is most important to not allow the user to end their forms application by closing the windows browser, they must close using normal form exit commands.
    What I want is to have separate frame = false, the big drawback to this option is the user can exit the application and bypass all forms code by pressing the windows "X" close button. This is why we need the code as just provided by Andrew Lenton above in this thread.
    BUT Andrew's code will always prompt the user before closing the window and I do not want that. I want the user to be prompted only under scenario 2 listed below.
    Here's the 2 case scenario for exiting the application.
    1. If the user closes properly and uses exit form which fires all normal form triggers including post_form with it's call to close.html file.
    All uncommitted changes are saved or rollback and the users session is ended normally both on the database and in the application server.
    All browser windows will close, great all is good. And without Andrew's code the window will close but with Andrew's code the user will be prompted to close or not, if they select Cancel the window will remain but the applet has already ended so why prompt? ...This is what I want to avoid.
    2. In the forms app. if the user clicks the windows "X" close button with uncommitted changes. The browser just closes the changes are rollback without prompting the user to save. The users sessions are now lost and still running in the database and application server until they are timed out.
    If I use Andrew's code then the user will be prompted to continue to close or go back, if they click Cancel to go back then focus returns to the forms application and the user can continue to work. If the user clicks OK then the window closes and unfortunately their sessions are still lost until timed out.
    So what I desire is to add to Andrew's code to check if the embedded applet is still running and prompt the user to close or not accordingly.
    Something like:
    Basejini.htm like
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function maximizeWindow()
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
    function confirm(){
    If(document.embeddedapplet.closed())
    Win.opener = self;
    win.close();
    Else if
    event.returnValue = "Closing Forms Application. OK to continue?";
    </SCRIPT>
    <BODY %HTMLbodyAttrs%, onload="maximizeWindow()", onbeforeunload="confirm()">
    %HTMLbeforeForm%
    I hope this explains my requirements.
    David
    From: Oracle, Evelene Raechel 10-Oct-05 06:45
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Hi,
    Note.199928.1 How to Alert User on Closing Client's Browser Window in Webforms
    Regards,
    Rachel
    From: David Wilton 11-Oct-05 17:40
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I'm sorry this is not helpful at all.
    Note 199928.1 is only an alert which does not stop the closing of the window and still displays as an alert if the user does close properly using exit form ... so why would you want to display the alert then?
    This is exaclty what I do not want and why I want to determine if the applet is still running before displaying any kind of message.
    David
    From: Oracle, Evelene Raechel 17-Oct-05 12:23
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Closing thread.
    Thanks,

    Hello,
    I had the same issue last year - wanting to provide a warning on closing the browser, but only if the Forms session is still running. The approach I took is described below, see also the thread where I originally posted this at Closing brower window
    Hi there,I've had a similar requirement - or rather, the two conflicting requirements: to warn when the browser is being closed, but for the app to be able to close the browser without a warning being fired.
    To always provide a warning when someone (the user or the Forms app) tries to go to a different page (e.g. your close.htm), use Javascript like:
    function confirmExit(){
    if(appletRunning==true) {
    msg="Closing this window or navigating to another page will end your SomeGreatApp session.";
    window.event.returnValue=msg;
    And make a call to confirmExit() in the onBeforeUnload event of your main page.
    You'll notice I first check an 'appletRunning' variable before displaying the warning. This Javascript variable is set to true by my app when it starts up, using an embedded Javabean that calls out to Javascript. Once that variable is set to true, then the warning will be displayed if the user tries to shut the browser by clicking on the 'x' button, or to go to a different URL.
    When my app is shutting down, it uses the same Javabean to set appletRunning back to false. It then navigates to a close.htm - which will be done without a warning being displayed.
    See Re: How can a Javabean call Javascript function of the basejpi.html?? for example code on how to call Javascript from a bean embedded in your Forms app.
    Hope these ideas help you out, it's worked for me (so far, anyway!!)
    James

  • Why CreateNewFrame() returns as NULL after successful created 136 child frame window and trying to create 137th child frame window in MDI application

    I am working on MDI application which was developed in VC++ in VS 2012. When my application is launched, it will display a Tree. Under a tree there are 254 nodes. Basically
    these nodes data are read from Configuration xml file and loaded into the Tree. By double clicking on each node, first it will create object for document class ( By calling CreateNewDocument() method) after that member variables for that
    document class will be initialized and then it will create the new frame window (by calling
    CreateNewFrame(pDoc,NULL). New child frame window will show under Main window to the user.
    User able to see the data from child frame window.
    Similarly by double clicking on each node it will create another object for the same document class and new child frame window will be opened for that node. Each child frame window runs
    in different data and showed under the Main window.
    Existing requirement by double clicking on each node, node data shall show in separate child window and there is no requirement for all 254 child windows opened simultaneously.
    But current requirement is , all 254 child windows shall open simultaneously by double clicking on each node one by one.
    In debug mode I have tried double clicking on each node. I able to open up to 50 nodes. After 50th child windows are opened, I unable to access to the application
    (Unable to open further node data window since application is getting hanged).
    Each child window is having tree, multiple splitter window and some additional controls (static text, ...).
    Same I have tried in release mode, I able to open up to 136 child windows. After that the application fail to create the new frame window in VS 2012. i.e CreateNewFrame() return
    NULL after successful created 136 child frame window. Debug purpose I have added the code to retrieve last error code by calling GetLastError() method. I got the value as "0". By closing any existing child window then I able to open remaining nodes.
    At any point of time I can reach maximum of 136 child frame window that can be opened under Main window. Failing to open all 254 child frame window
    simultaneously,  currently I fail to meet the current requirement.
    current Requirement is all 254 child frame window are opened simultaneously. Please let me know what may be the reason fail to create new frame window after 136 frame window that are
    opened already. In Microsoft site, mentioned that there is no limitation for creating frame  window in MDI application. I have tried another sample MDI application having limited number of controls, in which I able to create "n"
    number of child frame windows. why not able to create more than 136 child frame window in my actual application?
    Is there any possibility by changing project settings allow me to create 254 child frame window??
    Code Snippet as below:
    CDiagBaseDoc * CDiagBaseMDocTemplate::OpenDiagView( ...)
         CDiagBaseDoc* pDoc = NULL;
        if (pDoc == NULL)
            pDoc = (CDiagBaseDoc*)CreateNewDocument();
        if ( pDoc )
           CFrameWnd* pFrame = NULL;
           if (bAlreadyOpen)
                  // If Child frame window already opened, then handling the code here.
         else
               pFrame = CreateNewFrame(pDoc, NULL);
               if (pFrame == NULL)
                  ASSERT(FALSE);
                  delete pDoc;       // explicit delete on error
                 pDoc = NULL;
              ASSERT_VALID(pFrame);
              if( pDoc != NULL ) //VS2012
                 if ( !pDoc->OnNewDocument() )
                    TRACE0("CDocument::OnNewDocument returned FALSE\n");
                    delete pDoc;       // explicit delete on error
                    pDoc = NULL;
                    pFrame->DestroyWindow();
                     pFrame = NULL;
           if (pFrame)
               InitialUpdateFrame(pFrame, pDoc);
               ShowWindow( pFrame->GetSafeHwnd(), SW_MAXIMIZE ); //when opening node for the 1st time, maximize it
    }<o:p></o:p>

    Hi MuruganK,
    Have you checked how much memory your application used? You could check it by Task Manager. Maybe your application reach Memory Limits for Windows.
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    Is it possible that there are some memory leaks in your application? It would better if you have made a simple sample to reproduce and narrow down this issue.
    Best regards,
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Window closing error

    i written a java program for swing form. the form having default window close button. if i click on close button i displayed a dialog contained Yes-No-Calcel . if i click on cancel it will be exit. How can i stop the window closing.

    Look at this codes:
    import java.awt.event.*;
    import javax.swing.*;
    public class ClosingFrame extends JFrame {
         public ClosingFrame() {
              super("Closing frame");
              setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        int res = JOptionPane.showConfirmDialog(ClosingFrame.this, "Do you want to quit?", "Exit", JOptionPane.YES_NO_OPTION);
                        if (res == JOptionPane.YES_OPTION) {
                             System.out.println("Bye");
                             System.exit(0);
                        else {
                             System.out.println("So you stay!");
              setSize(200,200);
              setLocationRelativeTo(null);
              setVisible(true);
         public static void main(String[] args) {
              new ClosingFrame();
    }Denis

  • How to stop frame from closing?

    Hi,
    ramka.addWindowListener(new WindowAdapter()
                  public void windowClosing(WindowEvent e)
                      Object [] qqq = {"yes", "no"};
                      int answer = JOptionPane.showOptionDialog(
                                null,
                                 "want to close window?",
                                 JOptionPane.YES_NO_OPTION,
                                  JOptionPane.QUESTION_MESSAGE,
                                  null,
                                 qqq,
                                 qqq[1]);
                      if (answer == JOptionPane.YES_OPTION)
                           // WHAT TO DO TO STOP WINDOW FROM CLOSING?
                  });as you can see above i want to stop frame from closing.
    what should i do in the commented line?
    or maybe somewhere else?
    please help,
    thanks

    Hello friend,
    I've found a solution for your query. I think, you'll get a solution from my codings. I've given you below my codings,plz go through it.Verify it. Reply me about my codings.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    public class MyFrame extends JFrame{
         JButton jb=new JButton("My Details");
         public MyFrame(){
         JPanel jp=new JPanel();
         jp.add(jb,new FlowLayout(FlowLayout.CENTER));
         add(jp);
         jb.addActionListener(new ActionListener(){
         public void actionPerformed(ActionEvent ae){
                   if(ae.getSource()==jb){
                        String str[]={
                             "Name : Karthikeyan.K",
                             "Email-ID : [email protected]"
                        JOptionPane.showMessageDialog(null, str);
    WindowCloser wc=new WindowCloser();
    addWindowListener(wc);
         class WindowCloser extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   int res=JOptionPane.showConfirmDialog(null,"Do you want to exit from it?","Confirmation!!!",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
                   switch(res){
                        case JOptionPane.YES_OPTION:
                             dispose();
                             System.exit(0);
                             break;
                        case JOptionPane.NO_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
                        case JOptionPane.CANCEL_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
                        case JOptionPane.CLOSED_OPTION:
                             repaint();
                             doOpenFrame();
                             break;
         public static void doOpenFrame(){
              MyFrame mf=new MyFrame();
              mf.pack();
              mf.setSize(400,400);
              mf.setVisible(true);
         public static void main(String ar[]){
         doOpenFrame();
    }

  • Closing a Swing App with Window Closing Event With Dialogs On Close

    A while back I started a thread discussing how to neatly close a Swing app using both the standard window "X" button and a custom action such as a File menu with an Exit menu item. Ultimately, I came to the conclusion that the cleanest solution in many cases is to use a default close operation of JFrame.EXIT_ON_CLOSE and in any custom actions manually fire a WindowEvent with WindowEvent.WINDOW_CLOSING. Using this strategy, both the "X" button and the custom action act in the same manner and can be successfully intercepted by listening for a window closing event if any cleanup is required; furthermore, the cleanup could use dialogs to prompt for user actions without any ill effects.
    I did, however, encounter one oddity that I mentioned in the previous thread. A dialog launched through SwingUtilities.invokeLater in the cleanup method would cause the app to not shutdown. This is somewhat of an academic curiosity as I am not sure you would ever have a rational need to do this, but I thought it would be interesting to explore more fully. Here is a complete example that demonstrates; see what you think:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.BoxLayout;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class CloseByWindowClosingTest {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        launchGUI();
         private static void launchGUI() {
              final JFrame frame = new JFrame("Close By Window Closing Test");
              JPanel panel = new JPanel();
              panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
              JButton button1 = new JButton("No Dialog Close");
              JButton button2 = new JButton("Dialog On Close");
              JButton button3 = new JButton("Invoke Later Dialog On Close");
              button1.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        postWindowClosingEvent(frame);
              button2.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        JOptionPane.showMessageDialog(frame, "Test Dialog");
                        postWindowClosingEvent(frame);
              button3.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        SwingUtilities.invokeLater(new Runnable() {
                             public void run() {
                                  JOptionPane.showMessageDialog(frame, "Test Dialog");
                        postWindowClosingEvent(frame);
              panel.add(button1);
              panel.add(button2);
              panel.add(button3);
              frame.setContentPane(panel);
              frame.pack();
              frame.setLocationRelativeTo(null);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent event) {
                        System.out.println("Received Window Closing Event");
              frame.setVisible(true);
         private static void postWindowClosingEvent(JFrame frame) {
              WindowEvent windowClosingEvent = new WindowEvent(frame, WindowEvent.WINDOW_CLOSING);
              frame.getToolkit().getSystemEventQueue().postEvent(windowClosingEvent);
    }An additional note not in the example -- if in the button 3 scenario you were to put the window closing event posting inside the invoke later, the app then again closes. However, as implemented, what is it that causes button 3 to not result in the application closing?
    Edited by: Skotty on Aug 11, 2009 5:08 PM -- Modified example code -- added the WindowAdapter to the frame as a window listener to show which buttons cause listeners to receive the window closing event.

    I'm not sure I understand why any "cleanup" code would need to use SwingUtilities.invokeLater() to do anything. Assuming this "cleanup method" was called in response to a WindowEvent, it's already being called on the EDT.
    IIRC, my approach to this "problem" was to set the JFrame to DO_NOTHING_ON_CLOSE. I create a "doExit()" method that does any cleanup and exits the application (and possibly allows the user to cancel the app closing, if so desired). Then I create a WindowListener that calls doExit() on windowClosingEvents, and have my "exit action" call doExit() as well. Seems to work fine for me.

  • When I open itunes I get a 'DATA EXECUTION PREVENTION' 'Windows closed program'. Can anybody help please.

    When open iTunes it starts OK then a message from Windows appears, 'DATA EXECUTION PREVENTION Windows closed program'. Then the whole thing shuts down. Does anybody know how to sort this out please. I am using XP operating system and have recently updated iTunes. Thanks

    Hi alanfromharlow,
    It sounds as if iTunes is failing to launch properly on your Windows computer. You don’t mention what version of Windows you have, but one of these two articles should be useful to you -
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    iTunes for Windows XP: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1421
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Data changes saved when pop-up window closed instead of using Save button/action.

    We encountered an odd application behavior and we cannot tell if this is standard functionality or not.  When a spec is an a workflow step that is Signature Request, the Requestee can open a link to view the spec.  When the user also has edit permissions, they get the edit icon in the popup window.  We had a user that editted the spec then decided not to save the changes, so used the Close (red ex on popup) instead of the Action: Cancel button on the application menu. User expected that changes made would not be saved. It turns out that clicking the window closed save the modifications without any warning.  User expected Close to work like Cancel instead of Save.  Is this normal application behavior?
    Details.  Version 6.1.1.1 on IE9 with popup. 

    Did they make a change, close the popup, then workflow the Signature Request? Is so, then this is behavior we expect: When you are viewing a spec, you are viewing the in memory version of it, meaning that if you edit the spec, the changes are made to the in-memory version. If then clicked close, the in memory data is still loaded for that spec, and it may be that the signature request workflow event then saves the spec with those changes. The cancel button would have reverted the changes.
    You can, however, log an Enhancement Request for having the window close act like the Cancel.
    Thanks
    Ron

  • Catching window closing events from JFrame

    I'm having problems catching windowClosing() events from a JFrame (just doesn't get to my event listener it would seem!).
    I register and setup a window listener in the constructor of my JFrame class. Prior to this I set the default close operation as DO_NOTHING_ON_CLOSE (as you're suppose to if tyou want to handle window closing events).
    When user clicks on x (window terminate) button (in WIN systems), nothing is dispatched to my event listener. Any ideas?
    Extract from constructor:
    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    addWindowListener(new MainWindowListener(this));
    MainWindowListener looks as follows (EDImemConvert extends JFrame):
    class MainWindowListener extends WindowAdapter
    private EDImemConvert f;
    public MainWindowListener(EDImemConvert f)
    this.f = f;
    public void windowClosing(WindowEvent e)
    System.out.println("gets here...");
    f.ReturnResources();
    f.dispose();
    System.exit(0);
    }

    This works for meimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame {
      public Test() {
        addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent we) { System.exit(0); }
        setSize(300,300);
        setVisible(true);
      public static void main(String args[]) { new Test(); }
    }Normally, I just use this line
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    instead of adding a listener. It will clean up everything nicely.

  • Dispose objects during window closing

    I use vb to call java application through batch file (.bat) to connect to another java app to send message. Since the java application is executing in command prompt window, if the window accidentally closed, is it possible to close the connection, terminate loop, dispose objects properly during window closing? most importantly, the program at the other side knows the the connection is closed and message stop sending by the java app? Any suggestion?
    Thanks.

    Does your app have a fixed main window from where you launch other windows? If so, don't call System.exit(0) in windowClosing event for any of those windows except the main window and it would solve your problem.
    Otherwise you would need to somehow keep track of all the open windows in your application and in the windowClosing method you would check to see how many windows are open currently. If the window being closed is the only window open at that time, call System.exit(0). Else don't call it.
    Hope this helps.

  • Assignment Window Closed

    After insert employer information in assignment window (GOSI Details saudi arabia) the window closed suddenly.
    any hints

    The problem that i should enter this type of information (GOSI) .
    Emp A when i insert GOSI Info and commit form its close .
    Emp B if GOSI Info missing i can open Assignment window without any problem.
    Also the assignment window in fastpath after serching its close immediataly.
    Regards.

  • Safari crash when window closed

    Like the post earlier, safari crashes when a window closed. I used to have Speed Download, however, it is no longer on my system, and when i searched for it (and permutations of it I found nothing.
    I tried looking in the crash log, but I dont know what Im looking for.
    I would appreciate any further suggestions.
    Thanks

    Hello Illan Wall and welcome to discussions,
    Speed Down Load MUST be removed by using their own un-installer package that comes with it.
    Did you do that or did you just trash the Application?
    Hope that helps some
    Regards
    Ian

  • Changing the colour of frame window

    How can I change the colour of frame window and set some other colours?
    Rony

    Yes I did. I got this code by Rodney.
    JFrame.setDefaultLookAndFeelDecorated(true);
    UIManager.put("activeCaption", Color.RED);
    JFrame frame = new JFrame();It is a good one. But the extreme outer border still looks blue. Also, a window like icon is shown and some dots are shown near to minimize button. How to avoid these?
    Rony

  • How to access the handle of  the Frame window ?

    How to access the handle of the frame window through out the application ?. I want to display an alert box, while I click the fifth inner child component of the Frame . I am using Dialog Class for the alert box, I have to pass the frame handle to the Dialog constructer, I am getting the handle of the frame by getParent().getParent()......getParent().. But can any one suggest any better solution.

    If you application extends Frame or JFrame, you could simply refer to "this", or if you create a global or final Frame object that you use as your "top-level" component, you could refer to it this way. Additionally, if you're ever in a situation where you really need to go all the way to the top through n levels of components, I believe you could always do something like this...
    // assume myContainer is the "child" component that you're on, and you want to find its top-level parent
    Container c = myContainer;
    while (c.getParent() != null) {
         c = c.getParent();
    }

  • Detect window closing event in AIR application

    How do I detect the window closing event in an AIR app? Tried
    the following.
    deactivate and windowDeactivate events in the
    WindowedApplication tag.
    addEventListener(Event.CLOSING, onClose);
    addEventListener(AIREvent.APPLICATION_DEACTIVATE onClose);
    addEventListener(AIREvent.WINDOW_DEACTIVATE, onClose);
    None of them seem to work.
    Any ideas?
    Thanks
    CS

    The following works for me:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    closing="traceEvent(event)"
    windowDeactivate="traceEvent(event)"
    applicationDeactivate="traceEvent(event)">
    <mx:Script>
    <![CDATA[
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    As does:
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    applicationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.AIREvent;
    public function init():void{
    this.addEventListener(Event.CLOSING, traceEvent);
    this.addEventListener(AIREvent.WINDOW_DEACTIVATE,
    traceEvent);
    this.addEventListener(AIREvent.APPLICATION_DEACTIVATE,
    traceEvent);
    public function traceEvent(event:Event):void{
    trace(event.type);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>

Maybe you are looking for

  • A/P Down Payment Invoice error....

    Hi all.... Please Help me... I done all setup relevant to Vendor/Supplier for Business Partner Data........... But whan I am creating A/PDown payment Invoice I got error... In Vendor AP Down Payment Invoice I got error i.e "No Matching Records Found"

  • Newsstand cover is not updating

    Hi Bob, i have a problem with the Newsstand cover that is not updated when i do new issue in iTunesConnect! What do you think? No alpha channel in the PNG! We have a Professional that run fine...

  • How to maintain the synchronization between routing and bom in Production V

    We are maintaining the Prod version and assigning BOM and Routing to the prod version. But if user does not assign the mentioned BOM to the respective routing and selects the alternative BOM. Then how to keep the check the Production Version. Is any

  • Calling a customized .pdf in Isupplier Portal

    Hi all, I hava a urgent requirement in which I have to call a customised .pdf (Purchase Order) instead of Oracle's Standard purchase order. The .pdf can be call by selecting "view pdf" option from the "Actions" message choice. I have checked through

  • No skin when adding swf movie to website

    I've got a large avi that imported into Flash ... and I've encoded and exported ... all of those yummy things and I've published it for my website. It previews just fine (with Flash player) and in the IE browser and the controls are there. The proble