Musings about Java and Swing

Tag Archives: InputMap

Overriding the Standard JTextPane Methods

I’m developing an editor similar to Notepad on Windows. I’m using a JTextPane for the editor area. A JTextPane comes with all sorts of built in methods and keyboard shortcuts, like Cut (Ctrl+X), Copy (Ctrl+C), Paste (Ctrl+V), and Delete (Delete). This is great when you’re satisfied with the standard, built-in methods.