I want to find vowels positions in the string. How can I make shorter this code? I tried contains and indexOf method but couldn’t do it. Answer I assume you want to get m2rh5b7 from your input string Merhaba based on your code, then the below works fine, Or if you want just position of the vowels position only, the
Tag: position
Retrieve mouse position in JavaFX without event
I want to retrieve the x and y coordinates of the current mouse position before showing a stage. So far, the only way I found to get the mouse position in JavaFX is within a MouseEvent, which does not apply to my situation. Furthermore, I found the possibility to retrieve the position via java.awt.MouseInfo. This, however, I think is a
JavaFX 2 set/get cursor position
How can I set/get the cursor’s position in JavaFX 2? I tired googling the answer but found nothing useful. All I can do is setting the cursor’s style. Answer You can use robot for that purpose: AWT robot: http://docs.oracle.com/javase/1.5.0/docs/api/java/awt/Robot.html or glass robot: com.sun.glass.ui.Robot; which could be created with: com.sun.glass.ui.Application.GetApplication().createRobot(); To get the cursor position, see other post for this question