Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4408472

Merlinb48: Notepad demo: IllegalArgumentException when trying to Copy and Paste

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • client-libs

      IllegalArgumentException is thrown when i tried to copy paste some text in Notepad demo.

      Steps to reproduce:
      1) Run Notepad demo
      2) Type some text in the Notepad window.
      3) Select a word from the text you typed by doubleclicking on it.
      4) Copy it
      5) Again select the same word by double clicking on it
      6) Hit Paste button. Exception is thrown.

      The following exception was thrown:

      java.lang.IllegalArgumentException: getTransferData() returned null
              at java.awt.datatransfer.DataFlavor.getReaderForText(DataFlavor.java:613
      )
              at javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.importData(Bas
      icTextUI.java:2148)
              at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHa
      ndler.java:724)
              at javax.swing.text.JTextComponent.paste(JTextComponent.java:1079)
              at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(Default
      EditorKit.java:1219)
              at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:16
      05)
              at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
      ctButton.java:1659)
              at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
      .java:405)
              at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:251
      )
              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
      istener.java:247)
              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
      30)
              at java.awt.Component.processMouseEvent(Component.java:4861)
              at java.awt.Component.processEvent(Component.java:4687)
              at java.awt.Container.processEvent(Container.java:1299)
              at java.awt.Component.dispatchEventImpl(Component.java:3459)
              at java.awt.Container.dispatchEventImpl(Container.java:1361)
              at java.awt.Component.dispatchEvent(Component.java:3326)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3146
      )
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2866)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2824)
              at java.awt.Container.dispatchEventImpl(Container.java:1335)
              at java.awt.Window.dispatchEventImpl(Window.java:1250)
              at java.awt.Component.dispatchEvent(Component.java:3326)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:437)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:14
      0)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)



      ruchika.mehdiratta@Eng 2001-01-25

            tprinzing Tim Prinzing (Inactive)
            rmehdirasunw Ruchika Mehdiratta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: