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

TextField painting is broken when placed on a Scrollpane, XToolkit

XMLWordPrintable

    • b35
    • x86
    • linux_sun
    • Verified

      I have placed a few components including a textfield inside a ScrollPane. I have set SCROLLBARS_NEVER option for Scrollpane and I am scrolling it programmatically through setScrollPosition() method call. When I scroll the ScrollPane couple of times to the left and type something in the textfield, textfield is not at all getting repainted and any key operations performed on the textfield thereafter messes up the contents of the textfield completely. Also the focus border is not repainted properly and sometimes cursor also vanishes.

      This is reproducible on XToolkit only since Tiger. Looks pretty embarassing. Not reproducible on win32 / Motif.

      This is reproducible with all scrollbar policies on a scrollpane. When reproducing this failure with other scrollbar policies such as 'ALWAYS' or 'As needed', make sure you scroll the scrollpane in order to make textfield as the first visible component in the scrollpane.

      Run the attached test on XToolkit. You will see a frame with a scrollpane and a few components. Click the button 'Hi' TWICE. Press TAB to bring focus to TextField. Check whether cursor is shown. Press BackSpace and try deleting all the text. You will notice that initial 3 characters are never getting erased. Also check the focus border when running on Sol9 (CDE).


            dcherepanov Dmitry Cherepanov
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: