How to close other Windows Programs from a Swing GUI ?

I am making this really simple login program that once a user has successfully entered a username and password, and this is checked through a mySQL database , I run an Internet Explorer Windows.
Now I am trying to setup a logout button and when they push this button ideally the open Internet Exlporer Windows would close.
Does anyone have an idea how to do this is Swing or the wider java language or maybe even something built into windows ?
S.

It's as simple as obtaining references to the Windows and calling dispose() on them. How you obtain the references is entirely up to you. For example, you can create a List to hold all the children windows/dialogs that are created. And on logout you iterate through the list, dispose the child windows, and remove them from the list. Or maybe the child windows can add themselves as listeners to the logout button. When it's clicked and an ActionEvent is fired, the child windows can dispose of themselves automatically.

Similar Messages

  • How to execute a Window program from Unix box using Java

    I am trying to execut a program running on a Window box from Shell Script on a Unix box. Does anybody knows how to do that using Java. Thanks. Any feedback appreciated.
    kevin

    You need to use
    String fileNane = "setup.exe";
    Runtime.getRuntime().exec(fileName);that is if you are writing code
    if you are just calling if from a terminal just write
    java then the file name ( well I think that is right :)
    I do know that the code above work as I have it working on a windoze box
    Craig
    Hope this is right if not please let me know

  • How do i stop my programs from automatically popping up when i turn on the computer?

    how do i stop my programs from automatically popping up when i turn on the computer?

    When you log out or shut down, there will be a checkbox that asks you if you want to reopen windows when you log in. Just uncheck this box. If that isn't it, you may have login items turned on. Go to System Preferences>Users and Groups and then under your name click the Login Itens tab. Make sure nothing is there.
    If you want to stop windows from restoring when you open applications (so for example when you open Safari it doesn't open the 50 tab page you just had open when you quit) go to SystemPreferences>General and then hit the checkbox that says Close windows when quitting an application.

  • HT1379 How do I stop a program from opening at start up(iPhoto)?

    How do I stop a program from opening at start up? (iPhoto)
    Also, my mac recently shuts down completely while in sleep mode.  Any reason why this happens?

    If the app is opened when you shut down the Mac, untick Restore windows when logging back in. Open System Preferences > Users and Groups > Login Items and delete iPhoto

  • How to close open windows with ios7, How to close open windows with ios7

    How to close open windows with ios7, How to close open windows with ios7?

    Guess they thought we needed more exercise so now we have to swip them to close.....miss iOS6. My eyes are blurry now after looking at my phone, and my arms are tired from swipping lol

  • 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.

  • How to close child windows when parent window closed in jsp

    how to close child windows when parent window closed in jsp
    becoz it can't be able to recognise it's parent
    with the whole application
    plz send me some sample code of it

    Hi, I have no idea how to do this is JSP.
    However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
    Otherwise you can detect the onClose (I think) and close the window from there.
    However both the above are JavaScript and not JSP.
    rwgards,
    sim085

  • How to EXPORT a concurrent program from one instance to another

    Hi,
    I am new to EBS.
    How to EXPORT a concurrent program from one instance to another. I dont want to use FNDLOAD.
    Is there any other way from where we can export the concurrent program to anothere instance from CLIENT connection server.
    Thanks
    Asis

    Hi;
    What is EBS version? Why you dont use FNDLOAD?
    Pelase see below thread
    Move concurrent program to prod
    Move concurrent program to prod
    Regard
    Helios

  • How to run a Concurrent Program from the back end?

    Hi,
    How to run a Concurrent Program from the back end?
    Is it Possible to see that Concuurent Request id which we run from the back end, in the front end?
    If yes, then Please Give reply how to write the code
    Thanks in Advance,
    Bharathi.S

    This is documented in Chapter 20 of the Application Developers Guide http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121devg.pdf. These MOS Docs also have some information available
    221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
    235359.1 - How to Launch Planning Data Pull MSCPDP using FND_REQUEST.SUBMIT_REQUEST
    HTH
    Srini

  • How to submit a cuncurrent program from UNIX?

    How to submit a concurrent program from UNIX.Plz reply immediatly

    Please see;
    Oracle Metalink Document: How to Submit a Concurrent Request Using CONCSUB Syntax: Doc ID: Note:457519.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:5250231761732667752::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,457519.1,1,1,0,helvetica
    Adith

  • How do you uninstall a program from mountain lion osx

    Hi first time on mac forum
    my question is being new to imacs how do you uninstal a program from an imac running osx mountain lion. And of course get rid of the icon for that program from launchpad
    thanks

    What app do you want to uninstall? If it's an app that is provided by the installation of OS X, e.g. Safari, Reminders, Notes, Mail, etc. - there are many others - they shouldn't be uninstalled.
    If it is an app that was downloaded from the Mac App Store, in Launchpad click and hold its icon until it jiggles. Click on the 'x' in the corner to delete it.
    If it's an app that was installed using an installer program it is always best to see if an uninstaller is available from the developer of the app (there is often an uninstaller bundled in with the installer package).
    Other third party apps that are simply drag-installed into the Applications folder - like Skype, for example - can be just dragged to the Trash and will be deleted when the Trash is emptied.

  • HT5634 how can i remove windows 8 from my macbook pro

    how can i remove windows 8 from macbook pro

    Open the Boot Camp Assistant in the /Applications/Utilities/ folder and return the drive to a single partition setup.
    (103664)

  • How do I transfer TV Programs from my iTunes account to my iPod Classic (so I can watch them on my TV)?

    How do I transfer TV Programs from my iTunes account to my iPod Classic (so I can watch them on my TV)?

    Ha, it worked. Thank you anyways!

  • How to invoke a Java Program from Oracle 10g?(uRGENT)

    Hello.
    I've a query, that i have a program, that basically retreives the records from the
    oracle table and then parser this information and then insert the values in corresponding database base tables. I want that, whenever the new program is inserted, a Trigger should fire and pass the most recently entered record to the Parser Program, means
    1) Firing a Trigge
    2)Storing the most latest data and pass it to the Parser PROGRAM
    Can someone tell me how to do this? How to invoke a Java Program from within the database? Please if anyone has examples provide me. Its very urgent and tell me what is the basic mechanism.
    Thankyou.
    Ben

    With Java Stored Procedures Java may be caleed from a database.
    http://www.oracle.com/technology/tech/java/jsp/index.html

  • How to start an executable program from a java program ?

    Hi,
    does someone know how to start an executable program from a JAVA program ?
    Thanks, Fred.

    Take a look at the Runtime class.
    -S-

Maybe you are looking for

  • Using V3xx as a modem

    Greetings, I've got the V3xx RAZR and am trying in vain to get it to work as a modem. I've contacted Cingular and they have confirmed that my phone is set up correctly and that my Data plan supports the phone as modem. I've downloaded suggested modem

  • Images for multiple types of Apple

    Hi, Is it possible to make one image, and use that on different Intel Mac's? I want to setup an Image on a Mac Mini en use that same image on a couple of Mac Pro's and some iMac's. Michiel

  • Losing "read more..." links in published blog

    I was working on a blog, but when I uploaded it, the links to the posts were not working, specifically the headline, "read more..." and "add comments" links. Any links I created elsewhere on the page were fine. I could not for the life of me figure o

  • DBA Question - User stats

    Greetings, So I am sitting at my desk when PHB (that's Pointy Haired Boss for the non-Dilbert people out there) comes in and asks - "so is anyone really using that database they told us to set up?" "Uhh, gee, I don't know. I haven't gotten any phone

  • How to write query

    Hi, I need expert advice. on daily basis we are updating meter reading ( meter reading is nothing but "meter number / unit / date". Let say there are 10 apartment  and each apartment has separate meter. i need to write query get missing meter reading