Z
Z
ZzZero2014-01-24 21:28:07
Java
ZzZero, 2014-01-24 21:28:07

How to track changes in clipboard, JAVA?

How to track changes in clipboard, JAVA?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Lopatin, 2014-01-25
@ZzZero

On stackoverflow they say that this is not exactly what you need. FlavorEventnot sent if data is copied again from the same application.
Suggested solution here .

D
DiLighteR, 2014-01-24
@DiLighteR

for example like this:

Toolkit.getDefaultToolkit()
.getSystemClipboard()
.addFlavorListener(new FlavorListener() {
            @Override
            public void flavorsChanged(FlavorEvent e) {
                //данные в буфере изменились, можно брать из
                //Toolkit.getDefaultToolkit().getSystemClipboard().getData
            }
       });

U
uadeveloper, 2014-01-24
@uadeveloper

docs.oracle.com/javase/7/docs/api/java/awt/datatra... (java.awt.datatransfer.FlavorListener)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question