How can I hide the cursor?

I want to hide the cursor if the mouse enter some Components or a JFrame.
I tried to find methods to solve my problem, but I failed.
Someone can tall me how to do? Thanks.

One way to do this is to create a custom cursor based on a completely tranparent image. Then when you want to hide the cursor, set the cursor to the transparent one.
==================================================================
* Create a 'hidden' cursor by using a transparent image
* @return the invisible cursor
Cursor createInvisibleCursor()
Dimension bestCursorDim = Toolkit.getDefaultToolkit().getBestCursorSize(2, 2);
BufferedImage transparentImage = new BufferedImage(bestCursorDim.width, bestCursorDim.height, BufferedImage.TYPE_INT_ARGB);
Cursor hiddenCursor = Toolkit.getDefaultToolkit( ).createCustomCursor(transparentImage,
new Point(1, 1),
"HiddenCursor");
return hiddenCursor;

Similar Messages

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • How can we take the cursor to a different sub-screen from the BADI?

    Hi,
    We have to do some validation on Header, Operation and Relationship of any work order (IW31, IW32). We have checked that validations can be done at BADI WORKORDER_UPDATE in the method u2018AT_SAVEu2019.  But user wants us to take the Cursor back to the field and screen due to which the error is coming. How can we take the cursor to a different sub-screen from the BADI?
    Thanks in Advance,
    Pranav

    You 'ran out of room' because you tried to put your entire question into what is the 'Topic line' of the post.
    This is a fairly common error, as a scan of the topic list will show, and likely due to a design flaw in the layout of the composition page.
    Most posters who make this error do so on their first post, and are able to avoid a similar misstep on their second and subsequent questions.
    Regards,
    Barry

  • How can i hide the menu bar at the bottom of the app in itunes

    how can I hid the bar at the bottom of the App screen in itunes. Where it shows how much audio, app etc space you have left on your device

    Unforrtunately the status bar doesn't make any difference, however I have worked out that the bar does show when I go into full screen. 
    I would have thought it should also work when not in full screen - it certianly used to.

  • How can I hide the password and user name in url???

    Hi experts,
    I'm creating a login page and know I have a problem.
    The Username and password are verified in a Java class, after checking the user and password, the user should be linked to the portal.
    So far everything has worked well.
    But when I call the lin like this
    res.sendRedirect ("/ irj / portal j_user =" + UserN + "& j_password =" + passw);
    then the user name and Pwasswort appears in the url.
    Can someone tell me how can I hide the password and user name???
    It will be very helpful.
    Thank you
    Edited by: Cilvaring on Aug 5, 2011 12:00 PM

    If there is no specific reason that you have to use sendredirect...thne you can try request.forward.....
    RequestDispatcher rd = request.getRequestDispatcher("pathToResource");
      rd.forward(request, response);

  • How can I hide the borders and keep it as an option?

    How can I hide the borders and keep it as an option?  I had someone go into the css I believe, and make it so there were no borders visible on the page (I could see the dotted outline while working on it, but when pushed, it wasn't visible (which is what I wanted).  They called it "noborders."  Since I had to reinstall, it went away.  Help?
    I have Dreamweaver CS5.5

    Try this site:  CSS Border
    Add code then type in a zero. Later add border size you want.
    examples:  border: 0px solid black;
    or
    border: 1px 000000;
    or
         border-top-style: solid; 0px 000000;
         border-right-style: dotted; 0px 000000;
         border-bottom-style: solid; 2px 000000;
         border-left-style: dashed; 1px 000000;

  • How can I get the cursor's position in a opened file and display a menu?

    Hello,
    I want to make a program by which I will be able to display a panel/pops up menu at the corsor's current position, (In any text/doc file or in the desktop, we can display a menu by right click of the mouse.) Now I want my program to do the same task.
    More clearly-
    1. First I would save some words or sentences in a file(aa.txt).
    2. Then I would open another text file/ a word/ excel/ or any other editor( bb.txt / cc.doc / dd.xls / ee.html ).
    3. While editing or writing something in the opened file, if I click the right mouse button/ press a key (ctrl+space), a menu will appear containing the sentences I saved in the file(aa.txt) previously.
    My program will tell me the cursor's position in bb.txt / cc.doc / dd.xls / ee.html that i opened. And display a menu. my problem is not reading / writing in a file.
    My problem is how can I get the cursor's position in a opened file display a menu at that position by a mouse/key action*.
    Would you please help me on this regard.
    Thanks

    DrClap wrote:
    I think the OP wants to start up an application like MS Word and then operate it from a Java program.Doesn't The Monkey's Paw do that? What a second, according to Wikipedia:
    [http://en.wikipedia.org/wiki/The_Monkey%27s_Paw]
    <quote>
    ...the paw of a dead monkey is a talisman that grants its possessor three wishes, but the wishes come with an enormous price.
    The moral of the story is contained in this description of the paw: "It had a spell put on it by an old fakir," said the sergeant-major, "a very holy man. He wanted to show that fate ruled people's lives, and that those who interfered with it did so to their sorrow."
    </quote>
    So I guess that a non-sequitor ... or is it?

  • How can I hide the scroll bar in TextArea?

    How can I hide the scroll bar in TextArea?

    Hi. To remove the horizontal scrollbar you can do this:
    textArea.setWrapText(true);
    To remove the vertical scrollbar you can do this:
    ScrollBar scrollBarv = (ScrollBar)ta.lookup(".scroll-bar:vertical");
    scrollBarv.setDisable(true);  and set the opacity to 0 in the css file:
    //css file
    .text-area .scroll-bar:vertical:disabled {
        -fx-opacity: 0;
    }Here is an example:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ContextMenu;
    import javafx.scene.control.MenuItem;
    import javafx.scene.control.ScrollBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.input.ContextMenuEvent;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class TextAreaSample extends Application {
        @Override
        public void start(Stage primaryStage) {
        final TextArea textArea = new TextArea();
            textArea.setWrapText(true);
            StackPane root = new StackPane();
            root.getChildren().add(textArea);
            Scene scene = new Scene(root, 300, 250);
            primaryStage.setScene(scene);
            primaryStage.show();
            scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
            ScrollBar scrollBarv = (ScrollBar)textArea.lookup(".scroll-bar:vertical");
            scrollBarv.setDisable(true);
        public static void main(String[] args) {
            launch(args);
    }

  • How can I hide the recipients of a group text message?

    How can I hide the recipients of a group text message?

    This is Illustrator, no matter which version you are using.
    It doesn't work like in other programmes and Illustrator's behaviour is often undesired.
    There is no good trick that I'm aware of to mimic Draw's or Freehand's way to do it.

  • How can I hide the por:8080 on the broswer

    http://www.mydotcom.com:8080/examples/.....jsp
    How can I hide the port 8080, cause this is what shows on the URL.
    thanks

    I have no problem running with tomcat that contain chinese, but when I run the apache which is the same code as the tomcat are running, it cause error 500. I debug it , and found out that it was the chinese that cause the problem. once I took out the chinese, then it works find. Can any one tell me why?
    thanks

  • How can I hide the preview content of the text on ios 5?

    How can I hide the preview content of the text on ios 5?

    one complement. I want to hide it in the popup window.

  • How can I hide the version of ColdFusion showing in COldFusion Administrator

    How can I hide the version of coldfusion being shown from the coldfusion administrator login page? Right now I have the Version: 6,1,0,83762 showing.

    For security reasons.
    If there are known vulnerabilities with a specific version of a software release, you don't want to have someone who is scanning to be able to pull that information and then be able to try known attacks that will increase their chances of compromising your site/application.

  • How can I hide the time of the day in calendar events in OS 10.9?

    How can I hide the time of the day in calendar events in OS 10.9?

    Currently, the order in which the phone numbers appear (in a contact) is dependent on the sequence to which you enter them. There is no way to change that order other than re-entering them in the desired order.

  • How can I hide the tool data box?

    How can I hide the tool data box that reads out the loction in Photoshop CS6?
    It appears when I move a layer or change the size.
    It is very distracting and totally useless for me (I'm an artist - not an engineer).
    I can't find a setting to remove that black box.  I hope there is a way to make it go away...
    Thanks!

    It sounds like your talking about the transformation values.
    In the photoshop preferences under Interface you can set Show Transformation Values to Never

  • 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.
    ~

Maybe you are looking for

  • How to Fetch the Row value in SBO Formatted search

    Hi Experts, I have created a Sales order, in which i  have 4 UDF Fields(A,B,C,D) in the following: Example values: A  B  C  D  2   2   4  4 3   2   6  10 C=A*B D=1st value of D + 2nd col value of C i have written query for C, but how to write the For

  • Control the execution of the view

    Hi, I have a small application with one page. The purpose is, there are few search fields where the user can enter the search criteria and press the search button, and based on them data will be displayed from a view object where the search fields ar

  • Problem in return delivery -mto

    WHILE DOING RETURN DELIVERY for MTO the follwoing error is triggering.. " Create delivery not allowed(SYS status cost object VB0060046010)" pLEASE GUIDE HOW TO SOLVE THIS PROBLEM.

  • Column Heading more than 30 char

    Hi, In query template I am getting the column names dynamically, I want to show Alias instead of column names but in Oracle, column Alias has a limit of 30 char. How can I show the Alias with more than 30 char in Query Template? I need to export the

  • Disk I/O error

    This error comes every time i open a PDF in Preview. It also often occurs when starting (several) Adobe programs. - The mac runs perfect when i move the startup disk to a sata/usb adapter. - The mainboard was replaced last week. This had no effect.