Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

styrpe

[java] Mouse Pointer

This topic is 5424 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m a java noob.Well the thing is this.I am making OpenGL apps in java.I have manage to get GL apps running successfully in fullscreen exclusive mode.Now my simple question is.How can I make the mouse pointer disappear!!!!?????

Share this post


Link to post
Share on other sites
Advertisement
Well, in C++ (or VB for the same matter of fact) I would have known...
That''s:
ShowCursor(false); 


I''m not into Java, but maybe you can try that. Or do a search in the Java tutorials...


Creator of: Science Fiction Career
Percent finnished: 0.1%

Site: http://www.nightsoftware.com/scificareer
Forum: comming soon

Share this post


Link to post
Share on other sites
Thanks for the help.I used to do my GL programming in c++ and aware of that function.But Java is all about the classes.I tried to look for a mouse class ,but all the mouse classes are use for events.Tried looking in the JFrame class,no success either.I even tried looking in the graphicsdevice class.Like I said,I''m a Java noob.Took me all day trying to compile and run GL apps in JBuilder9,just missing the mouse part.Thanks for the help anyway.

Share this post


Link to post
Share on other sites
It depends on the library you''re using, is it LWJGL, Jogl or something different?

LWJGL has its own mouse routines (should be some examples in the test cases) where you either draw your own on the GL window or use a hardware-accelerated one.

Jogl uses standard Java cursor methods, so have a look for the tutorials and documentation around java.sun.com

Share this post


Link to post
Share on other sites
I''m using gl4java.I''ll try looking at it.But with normal Java,I think there must be a way.Cause with C++ ,the windows api is the one in charge of hiding the mouse.

Share this post


Link to post
Share on other sites
I don''t know exactly where, but you can change the mouse (to an image) and if you just give the name of an image that doesnt exist, your mouse will dissapear. I don''t know which class it is, I have to check that later. (gotta go to school in a few minutes )

Have you tried Sun''s site? java.sun.com

Wesley

Share this post


Link to post
Share on other sites
That''s the funny part.I did a GUI for Postgresql in linux.And I saw the mouse icon property somewhere and don''t remember exactly where I saw it.I was looking for it.I was searching in the Java sdk documentation and don''t no where to find it.The sad part is..when I don''t need it,I''ll find it.But I won''t give up.I came through all this GL thingy,and not knowing how to make the mouse disappear.That''s not acceptable,can''t do the easy part.Thanks all,for the help.I''ll try the mouse icon idea.

Share this post


Link to post
Share on other sites
Try Componnent.setCursor(Toolkit.createCustomMouseCursor("", new Point(0, 0), "i am an invisible cursor!"));. I think that works. Of course the mouse cursor still moves around, it''s just invisible. If you still want mouse input you have to use Robot.mouseMove() to keep it in the center. LWJGL would probably be easier...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!