0

I want to be able to paste my text where the user currently is typing. It should be possible in every program. Not just mine. I already found this question. But I am of course not able to use the first, accepted answer because I want to be able to paste in other programs.

I also don´t think it´s a good idea using the Robot class as some other answers suggested. Because random errors could occur.

Is there really no other, not hacky solution doing this?

Lasnik
  • 256
  • 2
  • 11
  • What user problem are you trying to solve by pasting text into Notepad, as one example? – Gilbert Le Blanc Mar 22 '21 at 23:30
  • Sorry for the late answer. Didn´t see it. Pasting text into notepad would be one example, yes. – Lasnik Mar 23 '21 at 16:29
  • My question is why? How does your function help the user? What are you trying to accomplish? – Gilbert Le Blanc Mar 23 '21 at 16:57
  • When I press CTRL + V a custom GUI pops up and you can choose what you want to paste. If you chose one of the options I want to be able to also paste it – Lasnik Mar 24 '21 at 05:16
  • Java is not the language of choice for a GUI like this. You need a language that connects better with the operating system, either Windows or Unix. Windows, as an example, has [clipboard managers](https://windowsreport.com/clipboard-managers-windows-10/) already available. – Gilbert Le Blanc Mar 24 '21 at 12:00

0 Answers0