Package javax.swing.text

Examples of javax.swing.text.JTextComponent.paste()


            if (text == null) {
                return;
            }

            text.paste();
        }
    }
}
View Full Code Here


            textComponent.cut();
        } else if (e.getSource() == copyItem) {
            if (!haveSelection) textComponent.selectAll();
            textComponent.copy();
        } else if (e.getSource() == pasteItem) {
            textComponent.paste();
        } else if (e.getSource() == deleteItem) {
            if (!haveSelection) textComponent.selectAll();
            textComponent.replaceSelection("");
        } else if (e.getSource() == selectAllItem) {
            textComponent.selectAll();
View Full Code Here

            textComponent.cut();
        } else if (e.getSource() == copyItem) {
            if (!haveSelection) textComponent.selectAll();
            textComponent.copy();
        } else if (e.getSource() == pasteItem) {
            textComponent.paste();
        } else if (e.getSource() == deleteItem) {
            if (!haveSelection) textComponent.selectAll();
            textComponent.replaceSelection("");
        } else if (e.getSource() == selectAllItem) {
            textComponent.selectAll();
View Full Code Here

      public void run() {
        final JTextComponent text = PasteAction.this
        .getTextComponent(evt);
        if (text != null) {
          if (text.isEditable()) {
            text.paste();
            text.requestFocus();
          }
        }
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.