CHAPTER 9

image

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 ...

Get Pro Java 8 Programming, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.