How to get position of cursor on screen ??

Hi all,
I am trying to get the coordinates of mouse cursor on the screen ( which might be outside the java application's window ) from my java application. I tryed to use SystemEventQueue, but it gives me the events only when the cursor is inside the java application's window. Is it not possible using pure Java ? If some body can give me some hints or share their experience, I will really appreciate it.
Thanks in advance.
Viju.

Not possible with pure java - would have to use a c/c++ dll and JNI and what is known as a "MouseHook" in the windows API.

Similar Messages

  • How to maintain position of cursor while in split screen view?

    When I'm in split screen view, how do I position the cursor at a specific point on the code side and then shift focus to the design side without relocating the cursor?

    Sorry, but the key phrase I used was "shows up". If you can't see it, you don't feel comfortable that it IS where you want it to be.
    Sure it works the way you said, but the comfort level of seeing it in the right place is missing.
    Another way of positioning elements in relation to tags is to use the Tag Selector at the bottom of your Document Window. Click the tag name in the Tag Selector, and the entire Tag and contents is highlighted. Then either strike the left arrow (to go before the tag) or the right arrow (to go after the tag), and you will be precisely positioned vis-a-vis the tag.
    Z

  • How to get rid of the on screen volume display?

    how to get rid of the on screen volume display, it stays on even after reboot. and when i hit the volume button another one shows on top of it.

    Sounds like a key on the keyboard is stuck down. Does it disappear if you disconnect the keyboard?

  • How to get information about cursor? I had only a reference on it.

    Hello
    How to get information about cursor, that I receive in my procedure as a reference. For example I need to know, a number of columns. I know nothing about this cursor, except the link on it.
    Best Regards, Kostya Proskudin!

    However, I would seriously reconsider what you are trying to achieve.
    It looks like you are trying to write some ultimately generic cursor processor. i.e. pass any cursor and process it in some generic way.
    Good design should include knowledge of what is expected to be passed and that knowledge can be put into the code.
    Generic code is inherently difficult to maintain and debug and will never 100% deal with all possible situations e.g. even if you know the table being queried in the cursor you can't rely on the data dictionary to give you all the returned columns if some of the returned columns of the cursor are computed columns.
    Be careful you aren't writing something that's going to cause problems later.

  • How can we position the cursor in Java?

    how can we position the cursor in Java? Please help me.
    and also provide me the list of threading practical question?

    I am talking in context of console.Note that the console can be a number of things in Java; command shell, teletype, etc. You can use either JNI or a third-party library such as jcurses for this sort of thing.
    ~

  • Does any one know how to get my Genius Apple Apps screen to work? Genius is Blank

    Does any one know how to get my Genius Apple Apps screen to work? Genius is Blank now regardless of how I enter the option. My upgrades, purchased, featured and searches all work in Apple Apps app. I have checked my settings for a possible fix to no avail. Tried all hand motions to see if they would fix or help and of course they did not. My Genius worked with some real possible apps I might want, now - absolutely nothing. Any solution that is actually possible will be appreciated.

    You need to be quite a bit more specific.  What exactly is the Desktop manager doing or not doing?  You have a Pearl....what model?  Look in Options >About and tell us what model you have and what OS it's running.  Also, what version of Desktop Manager, OS on your PC, etc. 
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • How to get rid of J2EE Login screen for each time Client App run?

    hi there,
    How to get riud of J2EE login screen for each time client application r un?
    regards,
    elvis

    in the j2ee tutorial they say that you should run like this:
    runclient -client <appjar> -name <name> -Dj2eelogin.name=guest -Dj2eelogin.password=guest123
    the only thing is that it did not work for me...let me know if it works for you.
    chukii

  • How to get the current cursor position in word report?

    I am generating a word report. But I would like to keep the table in one page. However, I did not find the way to do it in labview. Somebody would give me some suggestions? I appreciate a lot.
    One way I think I can do is to find the current cursor position. Since I know the table size so I can figure out if the left space in the current page is enough to hold the table. But I do not know how to locate the curent cursor position in word document in labview programmatically. I appreciate any suggestions on this question.
    Thanks.

    Hi,
    when you insert data in a word document you have to refer to bookmarks rather than cursor position.
    If you are using the Report Generation Toolkit for Office it is explained in the manual chapter 3-1.
    See also the example: Generate Report From Template (Word).vi included in the toolkit.
    If you aren't using the toolkit, you still have to refer to bookmark as reference points to insert and/or fetch data.
    The principle is:
    - First create a document in which you insert bookmarks where you wish and save it as a template
    - In LV open your template document and insert in it your data referring to bookmarks as insertion points
    - At the end save your report with another name, so you still have the template
    I hope I have been clear enough, if not just as
    k!
    Good luck,
    Alberto

  • BDC-How to get the value of the screen field

    Hi All,
    I am facing a problem while writing the BDC code for the XK02 transaction.
    Recording:
    We have recorded like this :after giving the values in the initial screen(vendor no and purchase group and selecting the purchasing data check box) and enter into the second screen and then click on alternative data icon.There we ll have set of plants we have to check auto ordering (by selecting the plant and click purchasing icon)for the plants which are in the given file.
    Problem:
    Suppose there are five plants(like 1,2,3,4,5) for a particular vendor but we are having only three plants in the file for which auto ordering check has to be done.The problem is that its doing auto ordering check for the first three plants(1,2,3) in the transaction.But  in the file we are having Plants like (1,3,5).How to get the screen field value directly or is there any other way to resolve the problem?

    Dear Raja,
    You cannot get hold of screen values while running through the BDC Operation.
    Only way you can get the value --> populating an Internal Table from the Database Table.
    Regards,
    Abir
    Don't forget to award Points *

  • How to get Position from EmployeeInfo in DIAPI

    I am using DIAPI(JCO) for SAP B1. According to one or my reuirement i am in need of Position from the EmployeesInfo. But there  seems no option or method for getting position from that. Can anyone guide me how to get that from EmployeesInfo ? Any help is appreciated..

    Looking at the DI API properties vs. DB fields mapping documentation in the SAP Business One developer area (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c5f5dbcc-0a01-0010-5d82-f25f2bee715e)
    it seems that this field is not exposed (yet).
    I.e. you could only run a SQL statement to get this information.
    Sorry,
    Frank

  • How to get default values on selection screen(multiple ranges)?

    i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000
    all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...

    Hi Suresh,
    You can either use select-options or Ranges. If you want the selection screen to be displayed with allwoing user to enter values apart for the default ones use select options else use ranges. With ranges what ever values use hard code would be set and the end user will not be able to add any more values (or range of values).
    Simply write the following code
    tables : <name of the table from which the field belongs>
    select-options <fieldname> for <tablename>-<fieldname>.
    <fieldname>-sign = 'I'.
    <fieldname>-option = 'BT'.
    <fieldname>-low = '7000'.
    <fieldname>-high = '8000'.
    append <fieldname>..
    similiarly add all the ranges that you need to include as default and in your select statement use the IN operator inthe where clause to include the range.
    If using range replacethe select-option with the range statement.
    Thanks.

  • How to get rid of the white screen on ipod touch

    How do I get rid of the white screen on my ipod touch, my power button is stuck.

    Display shows white screen
    Try turning the iPod touch off and then on again.
    If the iPod will not turn off, try to reset it.
    If that doesn't work, try restoring the iPod. See this article for assistance.
    Resetting your iPod
    http://support.apple.com/kb/ht1430
    Restoring your iPod
    http://support.apple.com/kb/HT1414

  • How to get Music Store beyond first screen

    I can get to the first iTunes screen but when I click any link I just get the message "Accessing Music Store..." at the top. It doesn't go to the second page. I have also noticed that iTunes is using 50% of my CPU. Does anyone have an idea of what's wrong?
    Thanks.

    Click here and follow the instructions to submit it as a series of podcast episodes.
    (42536)

  • How to get IP address from login screen in 10.7 Lion

    Hi All,
    In 10.7 I didn't find any option to get IP address from login screen as used to got in 10.4,10.5,10.6
    Thanks

    Jason,
    is there any way to make that example
    work with release 6.0, preverribly
    with IE5 (native VM)?
    The WHEN-CUSTOM-ITEM-EVENT Trigger
    doesn't seem to fire.
    Thanks
    Anton Weindl
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jason Pepper ([email protected]):
    If you are using web deployed forms then you need to use a javabean to obtain the IP of the local machine - you can get one that does it here..
    http://technet.oracle.com/sample_code/products/forms/listing.htm#pjcexamp
    If you are running client server then there is a utility in d2kwutil.pll that allows you to read the registry and do things like get the IP address. d2kwutil is shipped with your copy of Forms - just have a look for it - the code is self documenting, but there is also a manual you can read too.
    Jason Pepper
    Principal Product Manager
    Enterprise Internet Tools
    Oracle Corp<HR></BLOCKQUOTE>
    null

  • How to get the exact cursor position on Y-axis?

    The e.getYOnScreen() on MouseEvent not returning the exact position on the content pane! When I click at the (0,0) location in the JFrame, its returning (0,30).
    It may be the height of the frame title. How can I access the height of the JFrame title?

    baskaraninfo wrote:
    I have already tried adding MouseListener to frame as well as content pane. But, there is no significant difference.I have trouble believing this. Here where I add the mouselistener to the content pane, it works perfectly:
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    class MousePositionTest2 extends JFrame
        private JTextField xPositionField = new JTextField(3);
        private JTextField yPositionField = new JTextField(3);
        public MousePositionTest2(String s)
            super(s);
            JPanel contentPane = (JPanel)getContentPane();
            contentPane.setPreferredSize(new Dimension(400, 400));
            contentPane.setLayout(new FlowLayout());
            contentPane.add(new JLabel("Click Location: "));
            contentPane.add(xPositionField);
            contentPane.add(yPositionField);
            xPositionField.setEditable(false);
            yPositionField.setEditable(false);
            contentPane.addMouseListener(new MyMouseListener());
        private class MyMouseListener extends MouseAdapter
            @Override
            public void mouseReleased(MouseEvent e)
                xPositionField.setText("" + e.getPoint().x);
                yPositionField.setText("" + e.getPoint().y);
                super.mouseReleased(e);
        private static void createAndShowUI()
            JFrame frame = new MousePositionTest2("MousePositionTest2");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    }

Maybe you are looking for

  • What kind of SSD do I need for my Macbook Pro 13(MD102E/A)?

    Hi guys and gals, The thing is that my hd is dead as punk so I will have to replace it. I want to replace it with a Solid State Drive, can you guys help me find what kind of hard drive can I use for this model: MD102E/A Macbook Pro? Thanks in advance

  • F110 - Mass change house bank for one time vendor

    Hello, Is it possible to make mass changes for payment program for one-time vendors? I would like to change bank account from where do I want to pay something to one-time vendor. As far as I know, it isn't possible to change it that way, it is possib

  • Issue with Condition dependent PO output   in SRM 4.0

    Thought I am using Condition-Dependent Purchase Order Output The PO preivew still picks up the form which is defined under Define Actions for Purchase Order Output Please suggest. Thanks in advance

  • Trouble importing Axis packages

    Hi, I am trying to deploy a test web services implementation on JBoss 3.2.1 and Axis 1.1RC2. The problem is, I cannot even compile my client code (the one that invoke the web services)...it seems that the java compiler cannot locate the following pac

  • Forms 6i menu item not being re-enabled. Is this a known bug?

    I am trying to re-enable a menu item in a When-Button-Pressed trigger. However the set_menu_item_property doesn't always work. Is this a known Oracle bug?