0
How to get pos X and Y of object in java
Hello! I have the problem. How to get the position X and Y for button or something and how to change it. I was started with Java swing and I created the simple clicker. Thanks!
2 Réponses
+ 1
Hello Grzesiek
JButton has a getX() and a getY() method.
Here is a tutorial how to set the location of a Button: https://www.tutorialspoint.com/how-to-set-the-location-of-a-button-anywhere-in-jframe
0
Thanks it helped me ;)