Cursor « Event « Java Swing Q&A





1. mouse moved -crosshair cursor    stackoverflow.com

I developed a program to draw polygon triangles. The triangles were drawn using mouse drag. The coordinate of the triangles were stored in array list. Every times the mouse cursor, mouse ...

2. how to draw rectangle around mouse cursor in java?    stackoverflow.com

hey guys
i had made one module in my project,
on which user can draw any thing using pencil
now i want to create eraser for that drawing module
so i need that as soon ...

3. Java - custom cursor is different in different operating systems    stackoverflow.com

I create custom cursor with bottom code:

Toolkit toolkit = Toolkit.getDefaultToolkit();
Image image = toolkit.getImage("C:/Users/Administrator/Desktop/gaea/core/ui/gaeawindow/src/si/xlab/gaea/core/ui/gaeawindow/HandCursor.gif");

// Somewhere in mouse pressed action

public void mousePressed(MouseEvent e)
    {
       ...

4. In Swing, is there a way to extract a predefined mouse cursor Image from the toolkit?    stackoverflow.com

I'd like to make a custom help cursor by "badging" the built-in default mouse cursor with a question mark when the user is hovering over an object that can be clicked ...

5. How to change the mouse cursor in java?    stackoverflow.com

I have a list of words inside the JList. Everytime I point the mouse cursor to a word, I want the cursor to change into a hand cursor. Now my problem ...

6. How can I make the Image disappear when I click into it?    stackoverflow.com

I have an image inside the JOptionPane and I want it to disappear whenever I point the mouse cursor and click into it. Is there something to do about the position? Thanks... Here's ...

7. How to make Java Swing application show mouse cursor effects of Compiz Mouse Plugin (Ubuntu)    stackoverflow.com

The Compiz Showmouse plugin has some nice effects for people with low vision. Unfortunately, those effects don't work in Java applications out of the box. How can I get ...

8. Java Swing getToolkit and custom cursor strange behavior    stackoverflow.com

I am creating custom cursors in my Netbeans Java Swing app. For example, where 'cursorImage' is an image file on disk, I create my default cursor like so:

Cursor defaultCursor = toolkit.createCustomCursor(cursorImage, ...





10. Cursor Change Event    coderanch.com

11. Moving a mouse cursor    coderanch.com

I've developed a small app which handles the execution of a number of external applications and holds them in threads to which it sends heartbeats to ensure that their runtimes do not idle. What I need to implement now though is to move the mouse cursor to generate screen update events as if a user was sat at the PC moving ...

12. Mouse Cursor    coderanch.com

I have a problem about mouse cursor. I write an application, the main frame of which is inherited fram JFrame. I initiated the frame with frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE). I do some operations following the steps: a.Move the mouse on the title bar and left click "Maximum" icon b.Left click "minimum" icon c.Left click the application icon d.Left click the "resume" icon e.Repeat the ...

13. Change Image Of Mouse Cursor    coderanch.com

Hi, Is it possible to change the default cursor to an image? .... ...something like we have in MS Paint. the Cursor class has shapes like the HourGlass etc. which is good but can the cursor be associated to an image? I am trying to write an Whiteboard Application and when the user would click on the pencil button , i ...

14. Change the mouse cursor    coderanch.com

15. Mouse Cursor Not Changing    coderanch.com

16. Mouse cursor changes    coderanch.com

ok, is there anyway to tell whether or not a mouse cursor changes or not? for example: say the original cursor is a little STRAIGHT sword, and then when over a certain 'thing' the cursor changes to a little CURVED sword. is there a way to store the original cursor, and then be able to write an application that can notice ...





17. Moving the cursor using the key combinations    coderanch.com

See the last two paragraphs in the comments section of the Robot api about its use. import java.awt.*; import java.awt.event.*; import javax.swing.*; public class MouseKeys { JPanel panel; private JPanel getContent() { panel = new JPanel(); registerKeys(panel); // May be needed for JComponent.WHEN_FOCUSED // inputMap condition, see registerKeys. panel.setFocusable(true); return panel; } private void positionCursor(int direction) { Rectangle r = panel.getBounds(); ...