Restrict movement of dialog box

hi,
I have an internal frame when the user clicks a button a dialog box should pop up , how shall i restrict the movement of dialog box within the parent..(Desktoppane) i have used custom dialog box coz i need to capture the button click event.
Thanks in advance

You could use a JDesktopPane with JInternalFrames, this is their default behaviour. Read this section from the Swing tutorial on "How to Use Internal Frames":
http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
Otherwise, you would have to add a ComponentListener to the JDialog. Whenever the JDialog is moved, you would check its location and if it is outside the bounds of the parent frame then you would reset its location. Here is a tutorial on "Using a Component Listener":
http://java.sun.com/docs/books/tutorial/uiswing/events/componentlistener.html

Similar Messages

  • CS3 Help Menu "Move Items" Dialog Box

    CS 3.0.1, WinXP Pro. When I open the Help menu, I get a dialog box called "Move Items." It lists folders and says, "Select the place where you want to move 'help.html' then click the Move button." I click Cancel, it comes up again, I hit Cancel, and the html Help file opens. I recently hit the Move button, and had to repair the installation to get Help to work again. Must that dialog box come up?
    Thanks!

    Thanks Peter. However, the Move button blanks out when I choose that folder (which makes sense). If I move it somewhere else, Dr. Watson Postmortem shuts down and everything locks up or Help no longer works. Guess I'll just live with the infinitesimal inconvenience of the situation as is. I rarely use the Help menu, so it's not a big deal.

  • How to move a dialog box

    When I open the levels box in elements 11, it opens in the middle of the pic i am editing, how do I move this, or can I?
    Message title was edited by: Brett N

    Are you using Enhance>Adjust Lighting>Levels or using an levels adjustment layer?

  • Dialog boxes appear off screen

    Hi!
    I'm using Illustrator CC on a MacBook Pro. I use an external monitor as a second screen and usually move the application frame to the external monitor and work there. I started having the follwing problem: when I try to save or open a file, the dialogue box appears slightly off screen, so that I can't for instance type in a new file name, because I can't get to that part of the dialogue box.
    I have tried switching between different screen modes, but it doesn't help. Also I can't manually move the dialog box - which also seems strange.
    My external monitor is a NEC MultiSync EA273WM.
    Any idea what could be the problem or how to solve it? It's slowly driving me mad...
    Thanks in advance!

    Harlev schrieb:
    Any idea what could be the problem or how to solve it? It's slowly driving me mad...
    At the moment it looks like the problem is called 10.10.2
    You can read through the posts of last week on this forum, but I'm afraid you won't find a solution.

  • Dialog box display won't update after screen blank or being moved

    I have a modeless dialog box used for status display by a plugin I wrote for Acrobat. Everything works fine until the screen blanks or the user moves the dialog box on the screen, at which point no further updates to the dialog box are displayed. My plugin consumes 100% of CPU for long periods of time so the program can appear dead without this display being updated, but nothing I have tried seems to make any difference. The dialog box is generated with ADM and things I have tried include calling "Update" on the dialog box at regular intervals, the windows "Sleep" function to yield the CPU periodically, and a host of similar tactics.
    I'm guessing all the code will get run together once I click submit, but here is how I create the diaglog box (it was working fine without the "WinAppRegisterModelessDialog", but I saw a reference to it elsewhere and tried it to see if it would help, not sure if it actually serves any useful purpose):
    statWin = sADMDialog->Create(inPluginRef, DIALOG_ID, IDB_DIALOG1, kADMModalDialogStyle, NULL, NULL, 0);
    WinAppRegisterModelessDialog((HWND)sADMDialog->GetWindowRef(statWin));
    infoBox = sADMDialog->CreateItem(statWin, 5, kADMTextStaticType, &coords, NULL, NULL, 0);
    // Status header
    coords.top = coords.bottom + 10;
    coords.bottom = coords.top + 12;
    statHeader = sADMDialog->CreateItem(statWin, kADMUniqueItemID, kADMTextStaticType, &coords, NULL, NULL, 0);
    // Status line
    coords.top = coords.bottom + 10;
    coords.bottom = coords.top + 12;
    statLine = sADMDialog->CreateItem(statWin, kADMUniqueItemID, kADMTextStaticType, &coords, NULL, NULL, 0);
    // Progress bar
    coords.top = coords.bottom + 10;
    coords.bottom = coords.top + 15;
    progress = sADMDialog->CreateItem(statWin, kADMUniqueItemID, kADMProgressBarType, &coords, NULL, NULL, 0);
    sADMItem->SetMinIntValue(progress, 0);
    sADMItem->SetMaxIntValue(progress, totalPages);
    // Set window size, and other attributes
    sADMDialog->Size(statWin, coords.right + BORDER, coords.bottom + BORDER);
    sADMDialog->SetText(statWin, PROD_NAME " - Progress");
    // Set header for status line
    sADMItem->SetText(statHeader, " Page # % Complete Estimated Time remaining");
    // Initialize progress bar
    sADMItem->Update(progress);
    Updates are currently performed with the following code segment. The last two lines are my attempts to get the display to update once the screen blanks:
    // show it
    sADMItem->SetText(statLine, textBuf);
    // Update progress bar
    sADMItem->SetIntValue(progress, pagesCompleted);
    // Force display update/refresh
    sADMDialog->Update(statWin);
    // Yield for display update (in case of screen blank or user changes)
    Sleep((DWORD)100);
    Everything works fine until the window is moved or screen blanking occurs, after that nothing seems to work, all updates to the box cease to be displayed. Any suggestions?

    OK guys here's an update. First I went to BIOS and updated the initial display setting to "LCD panel only" from "Auto". At first I thought it helped, because when I worked at the laptop without the external screen attached, the internal LCD panel resumed normally from off (previously this didn't work).
    But today while I was in the office with my external 19" LCD screen attached, and both of them went off after being idle for 10 minutes, the internal LCD panel didn't resume again. So I've tried the Fn + F5 key combination to switch between modes, and I switched from dualview back to single. The internal LCD panel blinked for a second and then turned off immediately, and from that moment on, I was without picture on both of them. SO I ended up hibernating and resuming again. :( An important note - as soon as the computer began hibernating, the LCD went on and I could see the whole progress of hibernation before it turned off.
    Also another note - when I'm in dualview, I always have keep the internal LCD panel as the primary screen. So unfortunately, when it doesn't resume, I don't have access to the taskbar etc to try more things...
    Any more thoughts?
    Thanks again!
    Rado

  • Twitchy mouse on dialog boxes in photoshop cs6

    Hey there,
    So I have a really weird problem with photoshop cs6. For some reason my mouse cursor starts twitching when I move over dialog boxes. I have recorded a video to show you what I mean: https://www.youtube.com/watch?v=8rouox93xMo
    I am currently on the 30 day trial period, because I had gotten an unlimited license via surfspot, but that turned out to NOT be unlimited, suddenly expired (misinformation by surfspot), waiting to hear back from them to get a new license code. I've seen a lot of people on the forums complaining about the same thing, the surfspot unlimited license that suddenly expired shenanigans. I don't think that should have anything to do with it though, but I just thought I would put it out there.
    In any case, I'm running windows 8 pro, and... well if you need any other info ask me, I'm not sure what to add. Hope someone can help, it's really annoying, sometimes I can barely click the dialog box correctly to enter what I want.

    Hi robtompk,
    It is highly unlikely that your problems are because of purchasing a discounted version of the software. Just to be sure, can you try closing other applications open on your computer, and try opening the dialog boxes in DW?
    Also, what is the build number that you have? Use Help > About to get this information.
    Thanks,
    Preran

  • Photoshop CS5 pop-ups (Dialog boxes) will not stay / stick in place

    My pop-up / dialog boxes have always opened in the same place as I had placed them from the previous time I had used them. All of a sudden they will no longer stick / stay, they open in the center of the page.
    For example when I first open PS and I click Ctrl > C for Brightness / Contrast the box will open in the center of the page. If I move it to the side (so its not in the working area) it should open in that spot the next time I use it.
    But now it will always open in the center of the page regardless of where I have placed it before. Very annoying it have to move the dialog boxes all the time.

    What OS are you running?
    I know of no way Windows can cause that, but I don't know about OS X.
    If you can't find a direct solution, it might be a case where a complete Photoshop preferences reset to defaults could help...  Press and hold Control - Shift - Alt simultaneously (or Command - Shift - Option if on a Mac) immediately upon cold-starting Photoshop. If you get the keys down quickly enough - and you have to be really quick - it will prompt you to confirm deletion of your current preferences, which will lead to the establishment of a fresh default set. If it does not prompt you, you haven't been quick enough to get the keys down.
    -Noel

  • F4IF_INT_TABLE_VALUE_REQUEST -Restrictions dialog box

    Hi,
    I am using the function module F4IF_INT_TABLE_VALUE_REQUEST in screens, to implement a search help in my program , but instead of directly displaying the hit list , i want the restrictions screen to be displayed first with some default values, and the list should be displayed only based on the valuies entered in thius restrictions screen. How can i do this using this function module.
    To be more precise,
    i need the restrictions dialog box to be displayed and this will have 6 fields. i have to pass values to 2 fields from my program, the first field need not be filled and teh remaining fields should be left for the user to enter.
    how do i achieve this?
    Please help.

    Check the sample code. Using the Event PROCEE ON VALUE-REQUEST we can get the F4 Help.
    PROGRAM  ztest_duplica.
    DATA: kunnr1(10),
               kunnr2(10).
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  get_help  INPUT
    *       text
    MODULE get_help INPUT.
      DATA:i_retab TYPE TABLE OF  ddshretval,
           wa_ret TYPE ddshretval.
      TYPES: BEGIN OF x_itab,
      kunnr TYPE kunnr,    "it should be type to some standard data element
      END OF x_itab.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      CLEAR : kunnr1, kunnr2.
      DATA: dynfield  TYPE help_info-dynprofld,
            wa_itab TYPE x_itab,
            i_tab LIKE TABLE OF wa_itab WITH HEADER LINE.
      CLEAR  dynfield.
      IF sy-dynnr = '0100'.
        dynfield = 'KUNNR1'.
      ELSE.
        dynfield = 'KUNNR2'.
      ENDIF.
      SELECT kunnr FROM kna1
          INTO TABLE i_tab
          UP TO 20 ROWS.
      "retfield we will pass the column name we are going to get from f4
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'KUNNR'   "<---Return field column name
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = dynfield
          value_org   = 'S'
        TABLES
          value_tab   = i_tab
          return_tab  = i_retab.
      IF sy-subrc EQ 0.
        READ TABLE i_retab INTO wa_ret INDEX 1.
        ASSIGN (dynfield) TO <fs> .
        <fs> = wa_ret-fieldval .
        UNASSIGN <fs>.
      ENDIF.
    ENDMODULE.                 " get_help  INPUT
    Flow logic for 100 screen
    screen consists of Input field pointing to KUNNR1
    PROCESS BEFORE OUTPUT.
    * MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    process on value-request.
    field kunnr1 module get_help.
    Create a Tcode and Intitial screen 100. and check it .
    Regards
    Vijay Babu Dudla

  • When I right click on a link to open in new tab and move my cursor into the dialog box the box dissapears this is new in the last 24 hours.

    I'm using Firefox 8.0 on Suse 11.4 today is 11/28/11 the past 24 hours I've been experiencing this: I always try to right click on links and open in new tab, lately when I do so and move the cursor into the dialog box the box disappears. Also if I online shop say for clothing, if I want to change size's when I click the button to do so nothing happens when I want to scroll down and pick a different size, (I can hi-light the size and click on it then when the window scrolls back up the default size is still there. This isn't consistent with all web sites.

    You can middle-click a link to open the link in a new tab.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Move, delete, or rename files in Open or Save As Dialog box

    I want to be able to rename, delete or move a file when I am in an Open or Save As dialog box. Sometimes when I am opening a file or saving a new file I spot an existing file that needs to be renamed, moved to a folder or even deleted. In Windows I would just take care of that file and then keep going with what I was doing in the first place. This doesn't seem to work in Mac OSX. I have to stop, go to a Finder window, go to the location, do what I want to do to the file and then go back to the Open or Save As dialog box. There's go to be a better way in the "world's most advanced operating system." Ideas?

    SDA_MAC wrote:
    There's go to be a better way in the "world's most advanced operating system."
    no, there isn't.
    Ideas?
    you can ask apple to implement this feature
    http://www.apple.com/feedback/macosx.html

  • Firefox 3.6.6, avast 4.8.0 shows trojan in the firefox exe upx. When I go to move it to the vault a dialog box says the file an not be found

    I am running firefox 3.6.6, Avast 4.8.0 shows a trojan in the firefox exe upx. When I go to move it to the vault a dialog box says the file an not be found. I uninstalled firefox and got rid of all firefox traces using Revo. but I still get the trojan warning.
    == This happened ==
    A few times a week
    == I upgraded my firefox ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

    Firefox works fine on Windows 2000 SP4 for me.
    Any chance you have a dial-up connection that uses a web accelerator to speed the loading of content?

  • CS5 Move dialog box angles

    I've been using ai for many years. As far back as I can remember if you select an item and have either of the arrow tools as your current tool, hit the return key or double click either arrow tool you get the move dialog box. Everything in CS5 seems to be working the same until I try to move something up or down. I've always used positive numbers to move up and negative to move down. Now it's the opposite in CS5 (I don't know about CS4 since I've never purchased that upgrade). If I change the angle at the bottom of the box from 90° to -90° it works the way I'm used to, but the angle doesn't stick. Does/has anyone run into this and found out why or how to fix it? It doesn't seem to matter where I put the ruler zero at.
    Adobe Illustrator CS5
    Mac OSX 10.6.3

    Fruit,
    I think the Illustrator team was really listening to its users, who for  many many years have been shouting from the rooftops to change the Ruler  origin (0,0) to Top Left of the artboard.
    I am not sure about the rooftops; maybe we shall see answers tt that here: http://forums.adobe.com/message/2857555#2857555
    Illustrator had been the  exception to this rule (with its ruler origin at bottom left) when  compared to other Adobe products like Photoshop & InDesign which had  their ruler origin at the top left.
    ... and are all inherently (apart from PS) based on the conventions of Western writing:
    and Illy was not but is now an exception when compared with corresponding applications such as FH, Draw, Canvas, Xtreme.
    Agreed that some users will find the change not to their liking but that is how it works - no company can satisfy all its users all the time.
    They, could by making it optional. Still, as shown in post #4, it is doable.

  • Which shortcut can I use to move the highlight in a dialog box to the first field in the dialog box?

    I am working with FrameMaker 10. There used to be a keyboard shortcut  for moving the highlight to the first field in a dialog box. Without  this command I do not know how to move the highlight to the field I want  to modify. I assume the highlight is on a random field when my script  enters the dialog box.

    In iPhoto
    You need to switch Photo Stream on from System Preferences > iCloud not from iPhoto.
    See instructions here >  iCloud - Learn how to set up iCloud on all your devices.

  • CS6 "move" dialog box issue

    What is the secret to getting the "move" dialog box in AI CS6 to move objects the distance and direction entered in the box?

    It's a group of vector polygons, with effects attached. I think rulers, transformation center, and preferences are similar to defaults. I'm not a skilled enough user to change much. I like inches, so I changed that. But otherwise, it's fairly bland. How do you reset the preferences?
    I should also have mentioned that I'm using the 30-day trial version of Illustrator.
    Just now, I opened up a new file, created a single rectangle, and was able to reproduce the problem. You can download the file through this link: https://docs.google.com/file/d/0B0Hoxcl5zTEtT1dvR0RjMkFyRTQ/edit?usp=sharing
    Recipe for problem:
    - Open file
    - Left click the black rectangle.
    - Right click the rectangle, choose tansform->move
    - Tab. Tab. 1. Tab. 30. Tab. (note that h/v boxes fail to update, and remain 0)
    - Click preview
    Nothing happens.
    It seems to me that if you enter values in the horizontal and vertical boxes, the distance/direction boxes update appropriately, and the move works fine. However, if you enter values in the distance/direction boxes, the horizontal and vertical boxes generally do not update at all, then sometimes it works, and sometimes it doesn't. Sometimes, the first set of distance/direction numbers work fine, but if you leave the move box open, then change those numbers, the h/v boxes then fail to update, and clicking preview just causes the object to move as for the previous settings, or to not move at all.

  • Pointer won't move automatically to default button in dialog box in firefox 4

    Since I installed firefox 4, the pointer won't automatically snap to the default button in a dialog box. For example, when I delete trash in yahoo mail, there is a dialog that ask if I want to delete files, but the pointer is not on the default button.

    Thanks StephenB. Yes, it is now obvious that the default button has been selected without the cursor jumping to it, and as you say, hitting "Enter" does the job. Still not as natural a process as just clicking the cursor key and as your hand is already on the mouse it is probable faster to still move the cursor to the button.
    Maybe Mozilla will fix it in the future so that the cursor jumps once more.
    Regards

Maybe you are looking for

  • Issue in sorting data in already existing abap code

    Hi all, I have a code which fetches the data into an internal table. The content of the internal table is as follows(example): 1) Header 1 amount 1 2) item1 amount 2 3) item1 amount 3 4) item1 amount 4 5) header 1 amount 5 6) item2 amount 6 7) item2

  • I am using a MacBook Pro Mac OS X Version 10.6.8

    I am using a MacBook Pro, Mac OS X version 10.6.8  iPhoto 8.1.2 Suddenly iphoto will not open. I am traveling and taking many pics so I am quite frustrated. Any help is appreciated.

  • Consuming a Web Service in Perl - Import parameter

    Hey, i tried to consume a SAP Web Service with perl... Just calling the Web Service works fine, but I am not able to transfer a parameter. Here is the perl code: my $sapsoap = SOAP::Lite     -> uri('urn:sap-com:document:sap:soap:functions:mc-style')

  • Puzzling requirement --- SOS

    Hi experts , I need ur guidance i have two tables S1 and S2.Now we have three columns in it api_number well name and section.Remember the apinumber for both the column is one and same but some well names may be different . I have written a stored pro

  • Black screen on Macbook Pro 2014

    The screen on my MacBook Pro retina 2014 stays black for 20-30 seconds (with the cursor visible) when i activate it after it has been deactivated while not using the computer for a while. Why does it stay black?