mouselistener
Issue with adding a JPanel and add a mouselistener to it
I´m making a simple application in which there are a menu-screen and a game-screen. In the menu-screen there are a go-button and if you click it with the mouse the menu-screen switches to the game-sc[详细]
2023-04-11 16:40 分类:问答Shift focus from one JTree node to another
I need to shift focus from a JTree node to another node on the previous node being clicked. Example XML document:[详细]
2023-04-08 17:09 分类:问答How to do not repaint JFrame? Just paint
I need help with simple program. I would like, when I click program marks it. I would like to see my moves did in past. Like pencil in paint.[详细]
2023-04-03 12:57 分类:问答Adding a mouse listener to a rectangle in java
As the title suggests, I am attempting to add an action listener to a basic shape on a window.I\'m wondering if this is even possible?I\'m getting errors when I attempt to add the listener.[详细]
2023-04-02 01:24 分类:问答How to programmatically fire a MouseEvent to a MouseListener with Java?
I have a JTre开发者_Go百科e with a custom associated MouseListener (for showing popup etc.). I need to fire a MouseEvent that will be caught by the MouseListener. How should I do that programmatically[详细]
2023-03-23 18:43 分类:问答Java MouseEvent, check if pressed down
I have a class that implements MouseListener (JPanel). When I click on the panel something happens. What I want is some kind of while-loop that loops as long as left mousebutton is pressed down.[详细]
2023-03-23 12:12 分类:问答Java MouseListener for ComboBox
How do I add a MouseListener to a ComboBox? I have tried: c开发者_运维问答omboBox.addMouseListener(new MouseAdapter() {[详细]
2023-03-23 11:00 分类:问答Java mouse picking on diamond tiled map
Ok, im at my wits end. I am trying to create a small isometric tile map thats bigger then the screen witha viewpoint i can modify with mouse dragging.[详细]
2023-03-20 22:45 分类:问答Java repainting a component at mouse-over.
I am attempting to make my first properly customised GUI, but I am having difficulty changing the image which has been painted for a component. Basically, for my exitButton (a JMenu) I overwrite the p[详细]
2023-03-14 11:19 分类:问答Changing JPanel Graphics g color drawing line
i have a program similar to paint. and that i am trying to implement a change pen color however when i change the color, everything currently drawn is changed to the color RED for example in my progra[详细]
2023-03-08 08:48 分类:问答