JOptionPane is shown twice times

I have a problem with my JOptionPane. I have the following code:
if (...)
JOptionPane.showMessageDialog(null, "Kategorie mu� zwischen 1 und 5 liegen!", "Fehler", JOptionPane.ERROR_MESSAGE);
else
If I press the OK button in the "messagebox" the whole "dialog" starts again.
Can anybody say me, why this is so?

Already debugged your code? Put a System.out before your if, before showing your Dialog and after showing the Dialog (and maybe at plenty of other places).
Then you should see how the method is hit a second.
Hope this helps, Rommie.

Similar Messages

  • Iphoto, pictures are shown several times in an event.

    What's happening if the same picture in iphoto is shown twice or more in an event? Are these pictures saved on the hard disk more than one time or are they just in this event shown several times. Is it sufficient if I'm blind out the double? Thanks

    I found one work-around, but I hope there's an easier way:
    1) Right clip on the corrupted clip, and select "reveal in finder",
    2) Duplicate the clip and drag the duplicate to the desktop
    3) Select File->Import->Movies...
    4) Navigate to the clip on the desktop, select "Add to existing event", select event, and click "Import"
    5) The clip will be inserted in the original event, just before the corrupted clip
    Eric

  • Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi,
    Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi Shilpa ,
    Please refer to the following link and see if that helps you out.
    https://helpx.adobe.com/acrobat/kb/runtime-error-roaming-profile-workflows.html
    Are you trying to access the PDF with Acrobat or Adobe Reader?
    Regards
    Sukrit Dhingra

  • Select an artist in the 'view' & the same album is shown multiple times

    Hi, my top 'view' has Genre, Artist, Album as selection criteria. If I select 'The beatles' in the second pane (Artist) all Beatles albums are displayed but multiple times. E.G The album is shown 16 times, with one track on each entry. I just want it to show each album once in the main view ?
    Can this be changed or can I reset all settings ?
    Any help appreciated.
    Thanks
    Chris
    Message was edited by: chriskkkkkkkkk

    Article on that:
    http://support.apple.com/kb/TS1468
    That article is for itunes 7. The Compilation box has moved to the Options tab in itunes 8.

  • Every itunes song is shown twice- not in itunes, but on macintosh HD

    for example, one song is shown twice. when i click it and it shows where it is, one says:
    music folder-itunes-itunes music-nelly-wadsyaname single-wadsyaname
    the other:
    music foler-itunes-nelly-wadsyname single-wadsyaname
    do i need both files, or is one the one i'm using and the other im not?

    You one need one. By default iTunes will copy files to the ~/Music/iTunes/iTunes Music/ folder when you import songs. Select the song in iTunes and do a Reveal in Finder (command-R). This will reveal the file you should keep.

  • CFMCPopupMenu is shown multiple times if the menu key (VK_APPS) is pressed multiple times

    Hello,
    I have a problem with the CFMCPopupMenu in a Visual Studio Professional 2013 Update 4 created MFC DLL (Regular DLL using shared MFC DLL) and in a dialog based MFC application (others I didn't test - maybe in an SDI application too).
    If the menu key (VK_APPS) is pressed multiple times, the context menu is created and shown multiple times. 
    When pressing the Alt (VK_MENU) key or clicking with the mouse buttons the menu is not shown multiple times. 
    It seems to be bug in CDialogImpl::PreTranslateMessage case WM_CONTEXTMENU where it is tested if a popup menu is already shown 
    and if there is an active popup menu this popup menu is closed, but only if the pMsg->wParam == VK_MENU.
    The problem occurs in a dialog based MFC application and in dialog's in regular DLL's. 
    In case of MFC MDI applications the problem does not occur, 
    because in the CFrameImpl::ProcessKeyboard the key is passed to the popup menu for processing pActivePopupMenu->SendMessage(WM_KEYDOWN, nKey); and eaten up.
    You can reproduce the problem in the following way:
    1. Create a dialog based MFC application with the Visual Studio 2013 wizard.
    2. Add a menu IDR_MENU1 to the resource.
    3. Add a ON_WM_CONTEXTMENU / OnContextMenu message handler to the dialog.
    4. Insert the following code into the OnContextMenu handler of the dialog:
      _ASSERT(!CMFCPopupMenu::GetSafeActivePopupMenu());
      CMenu m;
      m.LoadMenu(IDR_MENU1);
      CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu;
      pPopupMenu->SetAutoDestroy(FALSE);
      VERIFY(pPopupMenu->Create(this, 100, 100, m.GetSafeHmenu(), TRUE, TRUE));
    5. Compile and start the application and press the Menu Key (VK_APPS) multiple times.
    -> You run into the ASSERT.
    If you press the Alt-Key or left click with the mouse multiple times all is fine.
    You can also add a tracepoint in the constructor and destructor to see that the CMFCPopup menu is created multiple times if the Menu-Key is pressed.
    Kind regards,
    Andreas.
    Andreas

    Hi Andreas,
    Thanks for posting in MSDN forum.
    Yes, I can reproduce this issue on my side. After look into the afxdialogimpl.cpp and afxframeimpl.cpp file, It really is a issue in the dialog message translate. I have no workaround to avoid this. But maybe we can try to use
    CMenu class and handle WM_RBUTTONDOWN message instead of WM_CONTEXTMENU.
    void CMFCPopupMenuTestDlg::OnRButtonDown(UINT nFlags, CPoint point)
    // TODO: Add your message handler code here and/or call default
    CMenu menu;
    VERIFY(menu.LoadMenu(IDR_MENU1)); //IDR_MENU_POPUP是新建菜单ID
    CMenu* popup=menu.GetSubMenu(0);
    ClientToScreen(&point);
    popup->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this );
    CDialogEx::OnRButtonDown(nFlags, point);
    By using this, we can avoid the VK_APP message caused multi pop up menu.
    Also have you tried submit this issue to Microsoft connect?
    https://connect.microsoft.com/VisualStudio
    Best regards,
    Shu Hu
    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.

  • Every page twice time printing needed in smartform

    Hi gurus,
    My requirement is that I need to print every page twice time like for example if I have 3 pages I need to print page 1 twice first and page 2 twice and page3 twice like wise.....
    This is preprinted format they have set up in the papare in the printer.
    I dont want print all the pages one time and one more copeis in the secod time.
    Every page twice twice.....
    Can you help me guys ......The point will rewarded if it is useful..
    Regards,
    Kumar s

    Hi,
    I have tried that option. I made 2 for that variable TDCOPIES = 2. But when you give 2 this variable which printing 2 copies like printing all pages one time ( 1 to 5) then again aprinting all pages (1 to 5).
    I dont want like that. I want print every page double time. page 1 double time , page 2 double time like wise...
    Thank you for replying me ASAP...But still haven't get the reult...
    Regards,
    Kumar s

  • 0ASSET_AFAB shown multiple times

    I loaded cube 0FIAA_C01 and there is a standard query 0FIAA_C01_Q001.
    The difficulty I am having is that the Depreation Area [0ASSET_AFAB] is shown multiple times (like 20) in the pull down when I execute the query and the variable entry screen is shown.
    Is there something wrong with how the Master Data as loaded?
    Here is a snippet of the [0ASSET_AFAB] master data:
    comp code    attachment     sub_number    depre area
    5000     1000000000     0     12     
    5000     1000000001     0     12     
    5000     1000000002     0     12     
    5000     1000000003     0     12     
    5000     1000000004     0     12     
    5000     1000000005     0     12     
    5000     1000000009     0     12     
    5000     1000000012     0     12     
    5000     1000000013     0     12     
    5000     1000000014     0     12     
    5000     1000000015     0     12     
    5000     1000000016     0     12     
    5000     1000000017     0     12     
    5000     1000000018     0     12     
    5000     1000000019     0     12
    Thanks,
    Mike
    I looked at the object 0ASSET_MAIN and it shows:
    comp code attachment   long description
    5000     1000000000     N10121409
    5000     1000000001     N10121409
    5000     1000000002     N10121409
    5000     1000000003     N10121409
    5000     1000000004     N10121409
    5000     1000000005     N10121409
    5000     1000000006     N10121409
    5000     1000000007     N10121409
    5000     1000000008     N10121409
    5000     1000000009     N10121409
    5000     1000000010     N10121409
    5000     1000000011     N10121409
    5000     1000000012     N10121409
    5000     1000000013     N10121409
    Edited by: Michael Hill on Mar 4, 2008 11:37 PM

    Ok ... Cool, better but I still get this in the java web:
    Book Depreciation   1 
    Acqisition Adjustment   2 
    Net Acquisition Cost   3 
    Federal Tax   10 
    Alternative Minimum Tax   11 
    Adjusted Current Earnings   12 
    Local Currency of Book Depreciation   31 
    Cost of Money   90 
    Book Depreciation   1 
    Acqisition Adjustment   2 
    Net Acquisition Cost   3 
    Federal Tax   10 
    Alternative Minimum Tax   11 
    Adjusted Current Earnings   12 
    Local Currency of Book Depreciation   31 
    Cost of Money   90 
    and it repeats !!
    In the abap web its sorted like:
    Book Depreciation   1 
    Book Depreciation   1 
    Acqisition Adjustment   2 
    Acqisition Adjustment   2 
    Is that normal?
    Mike

  • Album artwork shown twice on iPod Touch

    The album artwork for a certain album is shown twice on my iPod Touch, with one song listed under one copy of the cover art and the rest of the album listed under another copy. This has happened once before on a different album as well. I checked the tag fields in iTunes and the only one was different, the genre field. I changed this, tried erasing the album from the iPod and re-syncing, but can't fix it. WTH?

    Son of a...! I figured it out. One album name had "Of" in it and the rest had "of". What a pain...

  • Bound error message always shown twice?

    In my project every input field is bound to its own message-component.
    But if I start the project and the validator finds an error, all the error-messages are shown twice and I have no idea why! I checked the error-messages in the beans, there is everything ok.
    Does anybody know how to solve the problem?
    Thanks!

    thanks for the feedback.
    @ Darryl.Burke
    Your suggestion sounds quite good, but I can not imagine how this could work.
    You wrote:
    call requestFocusInWindow on the next component in the traversal cycleTo clearify my needs: I want to ensure for e.g. the JTextfield "dateTxt" a verification (starting my methode checkDate()) for the following cases:
    - verify the user-input after leaving the JTextfield via "pressing the TAB-key" (in other words loosing the focus) or
    - start a verification after "pressing ENTER-key".
    I?m not sure, wether these needs are practical with your suggestion...Do you have any code example of your solution? So I can better understand your idea...

  • Persistent ScriptUI Dialogs that can be shown several times.

    Hi all,
    I love ScriptUI and all its possibilities. But every time I try something new I fail for at least some days
    Here is my newest conundrum: I try to do something that involves selecting a menu item along the road. Assembling all menu items in a tree view takes up to 20 seconds so I would like to build that dialog only once and call it repeatedly from the main dialog.
    The test setup illustrates the problem:
    var w = new Window("dialog");
    var d = new Window("dialog");
    d.closeDlg = d.add("button", undefined, "Close Dialog");
    d.closeDlg.onClick = function () {
         d.hide();
    w.openDlg = w.add("button", undefined, "Open Dialog");
    w.cancelElement = w.add("button", undefined, "Cancel");
    w.openDlg.onClick = function () {
         d.show();
    w.show();
    The first click on "Open Dialog" looks as it should. But when you cancel d and click again, the sub dialog contains nothing and is off the screen.
    I can correct the latter (d.center() before d.show() ), but not the former.
    Help says "When a window or container is hidden, its children are also hidden, but when it is shown again, the children retain their own visibility states."
    I tried to show the children in a d.onShow() function but so far with no success.
    So my question is (thank you for reading this far):
    Can this be done? Can I build a complicated dialog once and call it several times from a different dialog?
    The only other option I can think of is to build an ugly super-dialog that contains all the controls of the main and of the sub dialog. bah.
    Thank you
    Gerald

    Duh...
    Peter I feel stupid. Of course. Thank you for pointing that out to me
    I updated the zip in the mentioned post, in case anyone's interested.
    Harbs, I save a lot of details in the list items themselves instead of maintaining an additional array. So removing all listitems would mean I lose e.g. the info which menu item is applied to which script.
    So rebuilding the list would mean quite some changing of my datamodels. I will keep that in mind for future projects, though. Thank you
    Gerald

  • Podcast Episodes are shown multiple times in itunes

    http://t.co/SE40IZgdBh
    iTunes shows podcast episodes on my iPhone multiple times. In the App on the phone it is shown correctly.
    Can you help me?

    It seems that many people have this problem if you Google it.  My wife has the snag on her iPod Touch 4, whereas mine is fine (well, it was, last time I checked.)  Regrettably, though the problem seems common, what I cannot find is any acknowledgement by Apple, let alone any advice, or, God forbid, a fix!

  • Since moving from POP to Imap, my send mail are shown twice

    HI,
    I have an hotmail account which I changed from Pop to Imap. Receiving, deleting and archiving mail work fine. But the send box in TB shows my mails twice. However mails which I send from outlook on line are shown only once.
    Is it so that by having twice my send mails is taking twice the size? How can I make it back to normal?
    Note that the addressees receive my mails normally , e.g. once . I have checked the account settings but did not find anything strange.
    In going server : imap-mail.outlook.com
    Out going server : smtp-mail.outlook.com
    Thanks in advance for your support.

    Hotmail/live/outlook.com accounts automatically copy a sent message to the Sent folder, so to avoid duplicates, uncheck "Place a copy in" under Tools/Account Settings/<i>hotmailaccount</i>/Copies & Folders.

  • "Faces Configuration" shown many times in Project Explorer

    in a Dynamic Web project i use Maven (m2e, m2e-wtp) and the JPA and JSF facet.
    and it happens that the node "Faces Configuration" is shown up to 5 times in
    the project explorer. after a clean one or some of these nodes vanish, but
    after the clean and build is completed they are back again in the tree. I
    already exported the project, reimported the project to a new workspace, but
    the behavior is the same all the time. At the moment i am happy with only two
    nodes visible in the explorer :)
    And when i double click in one of those nodes i get the message in a popup
    window saying:
    No JSF configuration file exists in this project.
    Please create a valid configuration file before performing this operation.
    But there is a faces-config.xml in the src/main/webapps/WEB-INF folder and the
    "Faces Configuration" nodes are able to show its contents, the navigation
    rules, the managed beans and the converters.
    Eclipse Indigo on Linux Debian with Java 1.6

    I have not yet been able to reproduce the multiple instances of the "Faces Configuration" node, but other functionality has been addressed by the module core bug, https://bugs.eclipse.org/bugs/show_bug.cgi?id=121460. Until this bug was addressed, a lot of WTP functionality struggled with multiple folders being mapped to the web root.
    When I make the following change to the "/.settings/org.eclipse.wst.common.component" file in an updated version of WTP, I no longer get the "No JSF configuration file exists..." message - that functionality is corrected:
    OLD:
    <wb-resource deploy-path="/" source-path="/src/main/webapps"/>
    NEW:
    <wb-resource deploy-path="/" source-path="/src/main/webapps" tag="defaultRootSource"/>
    This can't be corrected in OEPE itself, it requires this WTP fix and will likely also require an m2e/m2e-wtp fix, since I imagine it is m2e-wtp that is creating the file.
    I'm still trying to reproduce the multiple node issue; I have to wonder if it's related to the same fix as above, or if it is Linux-related. Do you ever see any other nodes duplicated in Project Explorer? I am continuing to attempt to reproduce. A zipped up project that demonstrates this behaviour might help considerably - let me know if that is possible.
    Thanks,
    - Ian

  • Same system being shown multiple time in Solution for Early Watch Report

    Hi Gurus ,
    I have some satellite system configured to Solution Manager . Today I can see the same system entry multiple time in the
    Operations: Solution Monitoring -> Early Watch Alert.
    eg .,
    I have a system whose SID is ABC , i can see the ABC entry for todays date (i.e., 4 FEB 08) nearly 4 time .And this systems are not rescheduled for the next EWR (i.e scheduled for 11 FEB 08- since we have kept a period of 7 days )
    Please suggest
    Anthony

    Hi Anthony,
    There was an error, that EWA sessions for one systems were scheduled multiple times per week.
    Please check [SAP Note 1083108 - Duplicate EarlyWatch Alerts|http://service.sap.com/sap/support/notes/1083108]
    Search for SAP Notes with key words: EWA, multiple, duplicate.
    Application area: SV-SMG-OP
    What's the software configuration of your SolMan?
    Best regards,
    Ruediger

Maybe you are looking for