How to control a windowClosing Event so that it doesn't hide the frame. URG

if(logIn_logOut.isEnabled()) // true if user is logged in
JOptionPane.showMessageDialog(null,"You must Logout before closing the Administrator application","Error",JOptionPane.ERROR_MESSAGE);
this.setVisible(true);
this.toFront();
else
System.exit(0)
i want to use the afore mentioned code so that if the user is Still Logged in and tries to close the application an error is displayed and the application is not affected.
but the problem is that the application hides by default and does not terminate.

make it so your frame does nothing when the when the 'X' is pressed...you can do it like this...
yourFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

Similar Messages

  • HOW CAN I DELETE AN EVENT WITHOUT  HAVING TO SELECTING IT FROM THE LIBRARY?

    I have a big problem.
    I want to delete an entire event from my library because everytime I select it imovie freezes and then close itself up. So I have to re-open imovie again. And when I want to select that particular event again the same problem occures. So I can not select that particular event. Therefore I can take NO action on this event.
    HOW CAN I DELETE AN EVENT WITHOUT HAVING TO SELECTING IT FROM THE LIBRARY?
    (Everytime I select it imovie closes itself up)
    All other events work fine. I believe The footage had a problem from capturing. but now it's in my computer and i can't open it.
    Please help me, I don't need this event, I can't open it therefore I can't use it and it takes place on my hardrive for nothing.
    Thank you

    One can delete it from one's computer. In the finder go to homeuser, movies, imovie events, delete the footage.
    Then reopen iMovie and see if that helps.
    Hugh

  • Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    That is a function of the recipient's e-mail software understanding what your software sent.  If it doesn't it will always show as an icon or attachment.   It is also a function of both your internet provider and their internet provider accepting messages of that size, and a function of their download attachment settings in their e-mail program.  There is no way to guarantee it will appear inline in the attachment.   The best you can do is attach with Windows Friendly format.  To do that, use the attach toolbar icon that looks like a paperclip, (View menu -> Customize toolbar if invisible) on Mac OS X Mail when composing the message.   A checkbox appears in the file dialog box's bottom to make it Windows friendly when you navigate to pick the PDF file.  That makes it as universally compatible as possible.  It still may not appear inline, but at least you are less likely to be incompatible.

  • How to design and implement an application that reads a string from the ...

    How to design and implement an application that reads a string from the user and prints it one character per line???

    This is so trivial that it barely deserves the words "design" or "application".
    You can use java.util.Scanner to get user input from the command line.
    You can use String.getChars to convert a String into an array of characters.
    You can use a loop to get all the characters individually.
    You can use System.out.println to print data on its own line.
    Good luck on your homework.

  • How do I edit out a fence that is in front of the background???

    How do I edit out a fence that is in front of the background???

    Can you post the photo to help explain what you are talking about?

  • I'm trying to burn my audiobooks on CDs.  Got through three books just fine, then my CD/DVD drive "disappeared."  I rebooted and got it back, but iTunes says, even after I un- and re-installed it, that it doesn't have the registries to burn CDs.

    I'm trying to burn my audiobooks on CDs.  Got through three books just fine, then my CD/DVD drive "disappeared."  I rebooted and got it back, but iTunes says, even after I un- and re-installed it, that it doesn't have the registries to burn CDs.  How can I retrieve this capability?  My audiobooks are from Audible.

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • How can i enable my ipod so that when i double press the home button i can play music?

    how can i enable my ipod touch so that when i double press the home button i can stop and start music?

    After you double click the home button, Swipe the list of active apps to the right and you will see the music controls and the screen rotation lock.

  • How do I get a home page that shows recent highlights and the news in lieu of Meet Mozilla Foxfire (this comes up each time I open foxfire)

    ''dupe of https://support.mozilla.org/en-US/questions/919154''
    When I downloaded Foxfire the home page came up with "Meet Mozilla Foxfire" then below that it shows "Become a Firefox Expert in 8 Easy Steps". I would like to delete this and in lieu of that show recent highlights and the news. I have no problem with the tool bars they are fine just the home page.

    See these articles for some suggestions:
    *https://support.mozilla.org/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    *https://support.mozilla.org/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    *http://kb.mozillazine.org/Preferences_not_saved

  • How do i create one source file that feeds two users on the same pro book?

    how do i create one source file/folder of photos that feeds two users on the same pro book?

    Well you can do exactly the same with a folder of photos, just put in the Users/Shared folder.
    Iphoto is a mite more complex than this. It's a database and so there's a bit more involved.
    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • I' ve just got an ipad (the new ipad) as a gift. It's a new one but Unfortunately, i found out that it doesn't have the App Store install. How to install the app? Please advice.

    I just got an ipad (retina display) as a gift. But unfortunately it doesn't have the App Store application installed. How to imstall it. Then i asked the IT to help me to find the solutions. They asked me to RESET the ipad. I tried to reset the ipad but it request 4 letters of password which i'm puzzled coz i don't even create any password yet in this ipad. So how to get the password? Can some one help me to solve this problems. Thanks.

    Your best bet is to contact Apple.  Those conditions should not occur with a new unit.
    I do suggest that you read Chapters 1, 2, and 3.
    If you wish to troubleshoot on your own...
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.
    /message/20157737/edit

  • How can I remove an SD card that I accidentally put in the CD slot on my MAC

    Any advice on how to remove an SD card that I accidently inserted into the CD slot on my MAC?

    Try thin strip of cardboard cut so that it can catch the SD card
    As shown in http://www.youtube.com/watch?v=hpwDfpH4hR0
    Allan

  • HT1212 How do you get into a ipod that you can't remember the passcode

    How do you get into a ipod that you have forgotten the passcode?

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

  • How do I create a text field that can be manipulated by the user?

    I have created a form that will be changed by the user from month to month. In this form they may have the need to make some of the font bold.
    The text fields that will end up being bold will not be the same every time so I can't format the field to be bold.
    Is there any way to allow the user to be able to choose whether a text field is bold or not?
    Thanks,
    T_Sands

    Thanks GKaiseril. When I do that and go to preview the form I see where the properties are listed as an option, but they are in light gray so I can't select them. Any idea why this is happening?

  • How do I refresh an animation so that it resets back to the beginning?

    So I created a drag and drop animation where the elements dissapear after they are dragged onto the target. I want to include a reset button that sets the animation back to the beginning so the user can play the drag and drop game again. Is there code I can include that resets the animation the same way that happens when you hit the browser refresh button?

    Here is my current code, the draggable objects aren't set on the timeline, they just live on the stage
       function init(){
       // apply the draggable JQuery UI plugin to the Symbols on the stage
       sym.$('TIF_sym').draggable({
       start: function(e){},
       drag: function(e,ui){}
       sym.$('DXF_sym').draggable({
       start: function(e){},
       drag: function(e,ui){}
       sym.$('DWG_sym').draggable({
       start: function(e){},
       drag: function(e,ui){}
       sym.$('SHP_sym').draggable({
       start: function(e){},
       drag: function(e,ui){}
       sym.$('DEM_sym').draggable({
       start: function(e){},
       drag: function(e,ui){}
       // apply the droppable JQuery UI plugin to the Symbols on the stage
       sym.$("DataLayerObject").droppable({
       drop: function(e, ui) {
                 // Hide Target Element Grey Box.
                 sym.$("FirstDrag").hide();
                 sym.$("Text").hide();
                 // Hide file box
                 var hideEle = "#" + ui.draggable.context.id;
                           console.log(ui);
                           $(hideEle).hide();
                 //Play timeline for each data layer when correct file is dragged onto object
                 sym.getComposition().getStage().getSymbol("DataLayerObject").getSymbol($(ui.draggabl e).attr("id").substring(6) + "_layer").play();

  • How can I set it up so that clients can respond to the threads in their cases.

    What can be done to allow clients that are logged into the member areas to respond to a case thread that is on going.

    Hi,
    The only option I can see is needing to use the CST feature instead.  The system will allow customer interaction and will track the conversation through email instead.
    We do not have an option for case responding through the actual site otherwise.
    - http://kb.worldsecuresystems.com/196/bc_1966.html
    Kind regards,
    -Sidney

Maybe you are looking for

  • Flat File in Unix to DB in Windows

    HI As part of POC I am trying to interface from a flat file in Unix server to a Oracle DB in Windows machine. I can access the file in Unix box using telnet/FTP. The directory and the file has rw-rw-rw- permissions. I have ODI installed in Windows ma

  • IOS music library and iTunes syncing problems

    Hello, Just wondering if the issues that have been bothering me for some time and with multiple recent iOS and iTunes versions are going to get fixed in the future? Adding or removing music manually or automatically between iTunes and the iOS has res

  • Is separate graphics card needed for Dreamweaver CS4?

    My PC (an HP Pavilion a1120n) meets the stated system requirements for Dreamweaver CS4, except that it has integrated graphics (max of 128MB) instead of a separate video card. I can easily upgrade to 4MB of RAM. Could anyone please tell me whether Dr

  • Duplicate type name with abstrac inherited type

    The problem I'm facing is that Oracle tools fail to assemble web services because my model classes inherit from an abstract class and the assembler does not seem to recognize this: build.xml:90: oracle.j2ee.ws.common.tools.api.ValidationException: co

  • Swap Images to cover text

    Ok...so I'm fairly new to the design world. I'm trying to do a swap image (which I understand in the basic form). I have a nav bar at the bottom of my site with photos and when I scroll over them I want a larger picture to pop up on top of them. But