Closing a gui without closing its parent

hi,
I am building a GUI that is opened up by another GUI. My problem is that when I close that new GUI, it closes all the other ones that I have open. It is because I am using System.exit(0);
My question is, what do I need to do to just close the new smaller GUI that I have opened, without closing the rest?
thanks in advance...

Yup its because of System.exit(0);
you need to this.dispose();

Similar Messages

  • How to create a Child Window without closing the parent Window

    Hi All,
    I have a requirement to create a child window without closing the parent window. I have to click an item in the parent window, then one child window should get open. The parent window should not be closed before closing the child window.
    Kindly help me in this.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I found the solution for this. I have created a new page. Then i created an item as link item style in the parent page and i have set the following properties in the Link item:
    Destination URI : OA.jsp?page=/seagate/oracle/apps/seasoa/que/webui/SeaSoaHeaderDetailPG&headerId={@ErrHeaderId}&retainAM=Y&addBreadCrumb=Y&backPage=S
    Target Frame     : _blank
    This is opening the new child window without closing the parent window.
    Thanks and Regards,
    Myvizhi

  • Can JPanel know that its parent is closing?

    Hi,
    I was trying to find some way for a JPanel to know that its parent JFrame is closing. I know that the JFrame has a WindowEventListener, but does a JPanel have an event which tells it that the program is being closed?
    The reason is that in one application i have various JTables working with RMI. Whenever a client closes i would like to "unregister" them from the server. Ideally i would like to capture an event in the JPanel which tells me that the program is closing and i need to unregister my JTables from the RMI server.
    If there is no such solution I will have to put my code into the "windowClosing" event method in the JFrame instead, but i was hoping my JPanels can know when it closes.
    Thanks in advance.

    Hi
    I think there is no direct method to tell program is closing in JPanel. But u can create custom interface and call the interfact method in windowClosing event .

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

  • I want to merge difference disk with its parent online without turnoff the VM.

    Hi,
    I want to merge  difference disk with its parent online without turnoff the VM.
    It is NOT snapshot it was created while   using P2V

    Hi ,
    "It is NOT snapshot it was created while   using P2V "
    Do you mean the virtual disk which created by P2V is a parent disk , then you create a VM with a differencing disk connecting to the parent disk ?
    Now you want to merge them , right ?
    I'm afraid it is designed to shudown the VM and then edit the disk .
    Best Regards
    Elton Ji
    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.

  • Making a Popup go to back when its parent does?

    Popup's seem to have an 'always on top' feature to them. When I show a popup and then change windows (i.e. ALT-TAB) the popup stays in front of anything. Is there any way to turn this off? Ideally the popup would follow its parent so it is always on top of the parent but when the parent is sent to back, the popup is sent with it.
    If there's nothing built-in, are the hooks available to implement this myself. I can't currently see a way to (a) listen on a window for changes to its z-order relative to other windows and (b) send a popup toBack or toFront?
    To see the problem, just show a popup and then alt-tab:
    public void start(final Stage stage) throws Exception
        BorderPane root = new BorderPane();
        Button button = new Button("Show Popup");
        button.setOnAction(new EventHandler<ActionEvent>()
            public void handle(ActionEvent event)
                Popup popup = new Popup();
                VBox box = new VBox();
                box.setStyle("-fx-background-color: #ddd; -fx-border-color: #aaa");
                box.getChildren().add(new Label("This is a popup"));
                popup.getContent().add(box);
                popup.show(stage);
        root.setCenter(button);
        stage.showingProperty().addListener(new ChangeListener<Boolean>()
            public void changed(ObservableValue<? extends Boolean> source, Boolean oldValue, Boolean newValue)
                // This is only called when the window is closed, not when it is minimized, etc
                System.out.println("Window showing = " + newValue);
        stage.setOnHidden(new EventHandler<WindowEvent>()
            public void handle(WindowEvent windowEvent)
                // This is only called when the window is closed, not when it is minimized, etc
                System.out.println("Window hidden");
        stage.addEventHandler(EventType.ROOT, new EventHandler<Event>()
            public void handle(Event event)
                // the best we get is a FocusUngrabEvent, which doesn't seem quite like what I want
                System.out.println("Window event: " + event);
        Scene scene = new Scene(root, 800, 600);
        stage.setScene(scene);
        stage.show();
    }

    I needed a similar functionality for an application a while back. Not for Popups but for Stages.
    a) One main stage which is always in the back
    b) A tree of child stages, each with 1-10 child's which are ordered in z-order depending on the order of temporal focus traversals of the stages (latest "clicked" or created stages and their child's in front)
    It was not an easy task to implement, the code was ugly...and it still has some "minor" bugs.
    You can see some posts in the activity of this jira issue:
    http://javafx-jira.kenai.com/browse/RT-4435
    z-order control for stages/popus could definitely be improved.
    Cheers,
    Nuwanda

  • FRM - 41105 You Cannot query records without a saved parent record

    I have 3 data blocks. The contro data block have document type and document number if we come to new record(I have written execute query for both header and detail part) the header block will show the detail of the documnet header(Header Details) and detail block will show the detail part.
    But my problem is when new record instance only the header block is querying and detail block is not querying and giving an error message(*FRM - 41105 You Cannot query records without a saved parent record*)!!
    Plz help me!!
    Thanks in advance,

    yea header tables PK is refered in the details table.
    and i have master record created already and have the detail record for those master records in the table.
    i want to query the detail record related to that master when we select a document number and document code in the control block.
    Its querying the master detail relevent to that header and giving this error messge while quering the detail record..

  • Is it possible to change the opacity of a window without affecting its children?

    hi I want to set the opacity of  a window to something like 0.2 but it seems to be that it also affects the opacity of its children Is there a way to do it without affecting its children?

    I don't believe so. Changing the parent container will directly effect the children of that container.

  • Displaying a Dialog Without Hiding its Frame

    Hello,
    I'm sure this question has been asked before, but I could not find it using the search engine...
    How can I display a JDialog window without hiding its JFrame?
    Thanks.

    This is a contstructor of the JDialog. I got it from the API. I am not sure if it hides the parent frame but it creates a non-modal JDialog object.
    public JDialog(Frame owner, String title)
    throws HeadlessExceptionCreates
    a non-modal dialog with the specified title and with the specified owner frame. If owner is null, a shared, hidden frame will be set as the owner of the dialog.
    This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.
    Parameters:
    owner - the Frame from which the dialog is displayed
    title - the String to display in the dialog's title bar

  • How can I install Snow Leopard on my 15" MacBook Pro without using its DVD drive?

    How can I install Snow Leopard on my 15" MacBook Pro without using its DVD drive?

    I'm assuming your dvd drive is broken? if you have a thumb drive large enough (8GB or better), you can use another computer to make a bootable image from the install dvd to the thumb drive. then you can install from the the thumb drive.
    Ihttp://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html
    that's a step by step walkthrough.

  • How to restore a control file without having its backup

    Hi,
    Can any one please suggest me how to restore a control file without having its backup.
    Thanks

    To add to what SB said, in years past the instructions for re-creating the control file manually were contained in the DBA Administration manual. It used to be and may still be common to be taking and saving a "backup control file to trace" for this purpose.
    If you lost only the primary copy of the control file and it is an OS file then while the database is shutdown you can copy the secondary over the primary and then use if to start the database. If the control file is stored in ASM then there should be a way to perform the copy via ASM.
    If you use rman for backups then a copy of the control file should be part of the backup process and you can retrieve it from the backup set then perform recovery using the backup control file though I do note the OP said something to the effect no backup exists. Still, I have knows of instances where the DBA did not realize that the backup set contained the control file and the spfile so I think this is worth mentioning just in case.
    HTH -- Mark D Powell --

  • How to get the jar file without knowing its name and any class inside it?

    Hello, everybody!
    I would like to know if there's a way to get a reference programatically to the initial jar without knowing its name and any class contained in it. By "initial jar" I mean the jar that was called in the prompt, like this:
    java -jar jarfile.jaror in another way, in a graphical system. To be sincere what I really want is to get a reference to the jar's manifest, but I know if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also help. So, is there a way to do this?
    Thank you.
    Marcos

    jverd wrote:
    marcos_aps wrote:
    abillconsl wrote:
    Can you be more specific - IOW, can you cite a specific case?Absolutely. I want to access the jar in source code with the java.util.zip.JarFile class, for example.But why? You still haven't provided a use case or explained what you're trying to accomplish. As already pointed out, whatever you're trying to do, this is a brittle solution. If you explain what you're trying to accomplish with this, somebody may be able to suggest a better approach.jverd, I explained for baftos. Anyway, I will try to be more specific. I start my sytem like this, from, say, for example, jar1.jar:
    import br.product.System;
    public static void main(String[] args)
        System.start("NameOfTheSystem");
    }The System class is in util.jar, for example. This jar is used by all systems. I wouldn't like to pass in the name of the system, as above. I would like that the System class could read it from jar1.jar's manifest file. I just would like to have this:
    import br.product.System;
    public static void main(String[] args)
        System.start();
    }It is more elegant and I don't have the name of the system in two places: code and manifest file.
    Marcos

  • How to set the horisontal offset for a node relative its parent in JTree?

    When using large icons for nodes in a JTree the whole tree looks very compact. I found a method setRowHeight(int height) to set the row height that got med some space between the rows. But I couldn't find a simular method to increase the offset between a child node and its parent.
    Any suggestions?

    You can control the offset through the BasicTreeUI, as discussed in this thread:
    http://forum.java.sun.com/thread.jspa?threadID=630707&messageID=3636590
    See reply #8 and #9.

  • How to print an email without printing its attachment?

    Dear All,
    How can I print an email in my inbox without printing its attachment?
    I have an email with pdf file attached, when i print this email, the pdf file also print with the main contents of the email.
    Also, the attachment printed in the same paper that the main contents print on it.
    Any solution for that?
    Regards,
    Abdelaal,

    Thank you for your suggestion.  But when I receive an email that has an attachment (shown by paperclip symbol) The email opens and shows the attachment(jpg picture) at the end of the email so when I go to print - the email pops up with the picture already opened inside the body of the email.  Can not figure out why this happens in mac mail.  when i used outlook in windows only email would show.  in order to see attachment you had to click on paperclip and only then would the attachment (picture apprear).
    Any other suggestions that I may could try would be appreciated. Thank you!  Gabriela

  • How to launch a function/procedure without suspending the parent process?

    Hi everybody,
    I would like to know if I can define something as follows in PLSQL:
    procedure master
    begin
    call a procedure_child;
    End master;
    I would like that the procedure master does not suspend the execution and wait that the procedure_child finishes in order to resume the executions with the further code.
    Thanks a lot in advanced
    Tomeu

    In the future, please stick to posting in a single forum.
    Re: How to launch a function/procedure without suspending the parent process?

Maybe you are looking for