Mouse « Layout « Java Swing Q&A





1. How do I set the position of the mouse in Java?    stackoverflow.com

I'm doing some Swing GUI work with Java, and I think my question is fairly straightforward; How does one set the position of the mouse?

2. Why the pointer x and y position never go below 4 and 23?    stackoverflow.com

I have the following code

import javax.swing.*;


import java.awt.event.*;

public class MousePos implements MouseMotionListener{

    JLabel x = new JLabel();
    JLabel y = new JLabel();

    ...

3. Get position/index of a JPanel in a GridLayout?    stackoverflow.com

I'm trying to follow MVC-design and currently creating a MouseAdapter in my Controller class. I have an array the same size as the GridLayout in one of my model classes. So when ...

4. how to get mouse position of a Java application?    stackoverflow.com

documentDOM.addEventListener("click", new EventListener() {
                            ...

5. GridLayout + Mouse Listener    stackoverflow.com

Okay guys I have a problem, I dont know how know which cell was clicked on a grid layout, is there any function? I have grid layout on container, for 10 rows ...

6. Getting current mouse position    coderanch.com

7. how to get the mouse's position    coderanch.com

8. Repositioning components based on mouse position    java-forums.org

Hello, I am implementing a zoom feature for a JPanel that is populated with many smaller JPanels. The premise is: when the user spins the mouse scroll wheel the "zoomPercent" is increased/decreased and then all the child components are resized based on their "defaultSize" and the new "zoomPercent" value. This all works fine. Now the problem I've run into is how ...

9. Mouse clicks in a GridLayout JPanel    forums.oracle.com

Hi. I have a JPanel set as a GridLayout (3 columns, infinite rows) I am populating this panel with thumbnail images and need to be able to identify when a user clicks on a thumbnail image and respons accordingly. The thumbnail images are not the same size as the grid squares. How can i alter the mouseclicked event to act in ...