Move a window without border

Hi guys! I am creating a weather widget with a nice PNG as a background image for my scene. I have set the style scene on transparent, used a PNG with transparency and voila. But I want the user to be able to move the window without border and I can not get the correct code. Here's what I've got so far:
          stage.addEventHandler(MouseEvent.MOUSE_DRAGGED,
                    new EventHandler<MouseEvent>() {
                         @Override
                         public void handle(MouseEvent event) {

                              stage.setX(event.getScreenX() - initialX);
                              stage.setY(event.getSceneY() - initialY);

                         }
                    });

          stage.addEventHandler(MouseEvent.MOUSE_PRESSED,
                    new EventHandler<MouseEvent>() {
                         @Override
                         public void handle(MouseEvent event) {

                              initialX = event.getScreenX() - stage.getX();

                              initialY = event.getScreenY() - stage.getY();
                         }
                    });
It does not move my right window and I also have a bad flicker when moving (Windows 7, nVididia 8800GT).
If you guys have any ideas please share.
Thank you!

Hello
I prefer rather than add managers on stage, add them to the root node. (Is What ever node)

The code is...

/**
 * Method to add drag listeners to the given node
 */
public void addDragListeners(final Node n){
       n.setOnMousePressed(new EventHandler() {
            public void handle(MouseEvent me) {
                     initialX = me.getSceneX();
                    initialY = me.getSceneY();
            }
       });

       n.setOnMouseDragged(new EventHandler() {
            public void handle(MouseEvent me) {
                 stage.setX( me.getScreenX() - initialX );
                stage.setY( me.getScreenY() - initialY);
            }
        });
}

And call this method passing the element root of your scene.

    addDragListeners(root);

The code above should work for you.
Happy coding! :)

Thank you best regards &,.
SAI Pradeep

Tags: Java

Similar Questions

  • I'm looking to move from Windows/Apple/logic and Cubase Cubase. My questions have to do with the current (2014) Mac mini, specifically the i5 $999 2.8 GHz with 8 GB of RAM. This computer will be powerful enough to run the current logic without any pr

    I'm looking to move from Windows/Apple/Logic Pro X and Cubase Cubase.

    My questions have to do with the current (2014) Mac mini, specifically the i5 $999 2.8 GHz with 8 GB of RAM.

    This computer will be powerful enough to run Logic Pro X DAW and Cubase 8 courses without any problem?

    I would say yes, but I post here too:

    Logic Pro

  • Internet does not work... How to move to windows 10 without internet

    Original title: windows 10

    my internet does not work... How to move to windows 10 without internet

    Assuming you want the free upgrade, create a disk the ISO with a working computer.
    https://www.Microsoft.com/en-us/software-download/Windows10

  • Mac startup showing Mac and Windows without windows in Bootcamp installed

    Hello

    I currently have a Mid-2009 MBP under Snow Leopard.

    In the past, I used Bootcamp for Windows 7 (then at 10 horrible) and had no problems.

    Annoyed, shattered Windows 10, returned to Windows 7. Made backup using the backup utility Windows on/dev/disk1 /.

    Had problems with El Capitan and wiped out all/dev/disk0 /.

    According to the screenshot below, when I start my computer displays the boot Mac and Windows options.

    I narrowed down it to caused by/dev/disk1 /, but there no other Windows operating system or backup are there.

    Is it possible that this is due to the partition on/dev/disk1/and EFI is possible to remove this fact and the option to start Windows without annihilating the entire HARD drive?

    EDIT: I know what may be in the wrong sub, please feel free to move if necessary.

    When in the Finder of Mac OS X, can you ascertain whether or not there is data on the Windows partition?

  • Keyboard shortcut to move a window between two monitors instead of drag and drop.

    I want a quick way to move a window from one monitor to the other in a double configuration monitor without having to drag the window with the mouse. This is particularly useful for full screen windows since to move, I have to exit full screen, catch them with the mouse and drag them to the other monitor. Ideally, I want something I can do with a keyboard shortcut.

    I don't know if this exists, I couldn't find it in a list of keyboard shortcuts. I think it would be an improvement for anyone to use multiple monitors which has good reason to need do to switch between several programs. Since windows looks at multiple monitors and identifies each in the settings of customization like 1, 2, 3, etc, it would make the most sense for me to have one high and one low. So if I have a window screen 2, I can hit a keyboard shortcut to move it to the same spot on monitor 1 (low) or monitor 3 (upwards).

    Maybe it exists in form some and I don't find it not, but if not I think it would be very useful, especially for anyone doing graphic design or programming work.

    (Also I filled out the form for that matter like windows 7, which is what I use at home, but he put it under the XP forum since that is what the computer I write from is running on.)

    Use the following key combination to switch between screens.

    "Windows key + SHIFT + key.

    Detailed instructions:
    Press in and hold the Windows key and then add and hold down the SHIFT key. While now hold both hit the left or right arrow key to move the current active window left or right.

  • Any way to reinstall windows without using external software?

    Sometimes I use programs that are too big for my computer.  They are usually dialog boxes.  And dialog boxes usually have the final orders down.  Which I don't see.  I drag the window to the top, but it is still too long and I can't move it all further because the title bar is completely out of the screen at the top.  I'm holding it by a single line one pixel.  With the help of the tool move does nothing: it must always click/drag on the title bar.  Is anyway to move in a coordinated way, without using external software such as Sizer?  Sorry, I've had the suspect using substantive programmes and it really wouldn't help me, because I do not see the handle which allows access to the size options.

    To move the Windows Active when you can't reach the title bar with the mouse cursor, press and release of + , and press .  You can now use the cursor arrows to move the window back to the desired location.  When the box is located here where you want, press .

  • Mobile Windows without reformatting.

    I recently had a very malicious virus attack my computer and it caused a near system failure.  A friend of the family is a certified technician computer and reformatted my computer for free.  However, in doing so, he reinstalled Windows on drive C and it takes all my space now, which puts my computer with low virtual memory running on an almost constant basis.  I have a lot of space on my D and a readers, is it possible to 'move' windows without reformatting everything first?  Thank you!

    A logical drive is a partition. In Windows, separate partitions appear as readers; for example, C: and D:, etc.. If you have only one physical hard disk (which is what it sounds like), then the way you did partitioning was not really helpful. It may make sense to separate the operating system from pure data because if you need to reinstall Windows it will leave your data intact. There is no reason to put programs on a separate partition, since they will have to be installed in all cases after the operating system.

    Look in Control Panel > Classic view > administrative tools > computer management > disk management. This will tell you how many discs hard physical are installed on your computer. It will also show the partitions and dimensions of the readers. If you have a very small (less than 160GB) hard drive, consider purchasing just a bigger. You do a clean install of Windows. If you want to partition the disk during Setup, make two partitions - one for the OS and programs and the other for data. Understand that it is not a backup solution to separate data like this on a single physical hard disk. If the hard disk goes down, so do all the partitions on the disk.

    You cannot simply copy your files from Windows the way you did. You must do a clean installation of Windows to a different partition for Windows. MS - MVP - Elephant Boy computers - don't panic!

  • Reinstall Windows without losing personal files

    I have an external hard drive I have Windows 7 on, but recently it seems to have got some corrupted files because it does not start. It gets past the windows splash screen, and then sits down with a cursor on a black screen. I can move the mouse cursor.

    I think that the best way to solve this problem would be to reinstall all windows files.
    I can plug the hard drive into another computer and view the files of the operating system of the computer.
    In short, what I'm asking if there's a way to reinstall all files in windows without losing all my personal files

    You can perform a custom installation.

    Boot from the Windows 7 DVD
    Click Install now
    Accept the license agreement
    When the option is displayed to select a type of installation, click (Custom advanced)

    Select the disk partition where you want to install Windows 7 click Next.

    You will receive the following warning:

    The partition you have selected may contain files from a previous Installation of Windows. If so, these files and folders will be moved to a folder named Windows.old. You will be able to access the information in Windows.old, but you will be able to use your previous version of Windows.

    (At all costs, do NOT click on anything in Format, deletion or Partition name.) So even do a custom installation, your personal files are still kept. Click OK

    The installation program will now begin installation. During installation, your computer will be restarted several times.

    Once the installation is complete, you can complete the Out of Box experience as the choice of your laptop, create a username, password, your time zone. You can then proceed to download the latest updates for Windows and reinstall your applications and drivers.

    You can then retrieve your personal files from the Windows.old folder and reinstall all of your applications and drivers.

    http://notebooks.com/2010/11/09/how-to-recover-documents-music-and-email-after-upgrading-with-the-Windows-old-folder/

  • Unable to move rear windows on screen

    original title: Miss me my open window.

    Somehow, I dragged on the side and it still shows the taskbar, but I can't select it. It is out of the far away, beyond the screen.  How can I get it back where it should be, without doing a restore?

    Here's how:

    Method 1: The victory-shortcut P
    1. While holding down the Windows Logo key, type the letter P until 'Computer only' is selected from the context menu.  This will disable any "projector" or additional monitor that can be activated and move all windows of this another monitor that you can see.
    Second method: the Windows key shortcut
    1. Switch to the window off the screen by selecting it from the taskbar. Even if you don't see it, it must be the active program when you press the keys to the next step.
    2. Press the Windows Logo key and either SHIFT key on the keyboard, then press the left or right arrow.  If left-Shift-Windows or Windows-SHIFT-right.  This will attempt to move your current monitor window.
    Method 3: The method of the Menu control
    1. Switch to the window off the screen by selecting it from the taskbar. Even if you don't see it, it must be the active program when you press the keys to the next step.
    2. Press Alt-space, then release.  You may or may not see a menu appears, but do nothing with him directly: now, type a M to select the option "Move" in the menu.
    3. Press on one direction at all only one key.
    4. By ensuring not to click, move your mouse until you see the window.  It should be 'stuck' with your mouse pointer and moving with it.  Then, you can move the window normally and click to fall into place.
  • Is it possible to only use the keyboard to move a window on the desktop?

    I have a lot of fun trying to do it all with just the keys and trackpad not.  One that I'm missing and it would be very useful would be to find a way to move windows with just the use of keys.  I expect the arrows would be involved, but to do something about the window I want to move.

    I believe you can use the best tool to touch (http://www.bettertouchtool.net) to assign keyboard shortcuts to move the windows.

  • move the window app with a finger slide

    Hello

    I lost a feature of my OS X (El Capitan) I really like and do not know how to bring it back. This feature allows to move a window from one space to another app just using one finger around any window title bar. He is still working on my Macbook, but not on my iMac. I guess you why. If anyone can help me.

    I never heard of 'one finger '; You can set to hang out with 'slide three fingers' in system preferences - > accessibility-> mouse and Trackpad-> Trackpad Options. Perhaps by comparing the settings that you have here and those in the system-> between your two Mac Trackpad preferences you can understand what is different.

    Or maybe you have a few add-on from third party that is installed on a mac, but not the other?

  • Cannot move the window when hiding the menu bar

    I can't drag the window of firefox when hiding the menu bar. Looks like by dragging the empty box next to the tabs does not work. I have to activate the menu bar which is pretty ugly, whenever I want to move the window. Any advice?

    You can try the pref browser.tabs.drawInTitlebar true to turn on the topic: config page.

    You can also consult the extension Classic theme restaurateur.

  • Can you watch a movie download rented without an internet connection?

    Can you watch a movie download rented without an internet connection?

    If you rented the movie and download it completely, then Yes, you can watch it offline.

    But if you rented the movie and download is not finished yet, that won't work. The film will not download without an internet connection.

  • Why doesn't the cursor disappears whenever I use it to move the window (Windows: 32.0 FF)?

    Why doesn't the cursor disappears whenever I use it to move the window (Windows: 32.0 FF)? How to bring back the cursor?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • Re 29,0 Version, will be the classic look of Firefox with the blue bar at the top to move the window of the browser around, never offered again?

    Version 29 has a lot of wonderful themes, but none of them offer the blue classic windows on top bar by clicking on and holding down and move the window. This theme never come up again.

    3. open the Menu button (to the right of the Navigation bar) > customize-> click on the button from the title bar in the lower left corner - then exit customize

Maybe you are looking for