Clipboard listener?



Hi all,
I have implemented the basic cut/copy/paste functionality in my Swing
app, but I bumped into a problem that I have not been able to find an
answer to after extensive Googling and browsing the Swing API text.

The issue I'm having is how to know when the paste action should be
enabled and when it should not be. The cut and copy actions are easy,
since I can simply listen to whether a selection has been made or not.
But how do I know whether the paste action should be enabled? I was
expecting there to be something like a "ClipboardListener", but I was
unable to locate such a class or interface.

Could someone point me in the right direction how I should go about
this?

Thanks, Jonck

.



Relevant Pages

  • Re: HTML vs Swing for U.I application architecture
    ... >> the latest web technologies. ... >> Swing to web any day of the week and twice on Sunday. ... but that is not an option for a cross platform app. ... When I wanted a thick client, ...
    (comp.lang.java.programmer)
  • Re: Oh god, what will I have stared with this post...
    ... develop a small app with JSP/HTML/Javascript. ... That a Swing GUI is better ... > the internet, and that has an interface that the user ... everybody is using a browser as their client. ...
    (comp.lang.java.programmer)
  • Re: invokeLater and weird race conditions in my swing app
    ... I have a swing app that needs to read from a database when building ... My app seems to be suffering from race conditions. ... Apparantly randomly it hangs when updating a data model for my JTable. ... The EDT is started by the JVM when you realize the first GUI component. ...
    (comp.lang.java.help)
  • swing comments from an ex-C++ motif programmer
    ... I am new to java and am just starting to use swing. ... possibly with a GUI builder. ... custom-built non-web app can deliver. ...
    (comp.lang.java.help)
  • Re: The Difference is Obvious!
    ... It still sucks though. ... Swing takes much longer than it does in Delphi (though a factor ... slower than a Win32 VCL app or a C++ app. ... i have D7 and IntelliJ on my PC, ...
    (borland.public.delphi.non-technical)