Adding Cut-and-Paste Functionality
Cut-and-paste functionality is extremely useful because it allows you to transfer data between user interface components and even between different applications. In general, cut-and-paste operations are performed on components that support the concept of a selection, and the operations are initiated by the keyboard and performed for the component that currently has the input focus.
Some Swing components include built-in support for cut-and-paste and as a result you’ll often be able to use cut-and-paste operations within your application without writing any extra code. However, it’s still helpful to ...