bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/23530] New: JScrollPane layout issues


From: hendrich at informatik dot uni-hamburg dot de
Subject: [Bug swing/23530] New: JScrollPane layout issues
Date: 23 Aug 2005 12:45:25 -0000

See attached testcase for some JScrollPane issues.
Tested against classpath CVS 20050823. 

Compile and run with both a JDK and classpath+jamvm (or whatever)
for comparison. 

(1) When first started, both GridCanvas'es should come up in their
    initial preferred default size of 400x400 due to the call to
    JFrame.pack(). No scrollbars should be visible due to the default
    policy of xxx_AS_NEEDED.

    However, JScrollPane does reserve the extra pixels for both the
    horizontal and the vertical scrollbars. Looks bad and is wrong.

(2) Type 'a/s/d/f' and 'h/j/k/l' keys to change the (preferred) size 
    of the GridCanvas components.

    When I type 'a' repeatedly on the one canvas, the canvas does
    shrink its x-size by one-pixel. At the same time, the JScrollPane
    alternately shows and hides both scrollbars. Funny!

    Same with 'j' for the y-size.

(3) Try typing 'd' and 'k' to increase the x-size and y-size of the
    GridCanvases in one-pixel increments. The JScrollPane seems to 
    notice that it *needs* the scrollbars one-pixel late (at size 402
    instead of 401).

(4) Try to make one of the canvases smaller than the current area of
    the JScrollPane, so that extra backgroud space exists between the
    manager target GridCanvas and the JScrollPane sliders. 

    In this situation, the GridCanvas will often fail to re-gain the
    keyboard focus (despite the explicit requestFocus-call) after you
    have used the corresponding slider. On my system, I have to leave
    the whole application window and move back to the window for the
    mouseEntered() call to work.


(5) All of this still fails to demonstrate the real issue I have with
    one of my apps, and which is the reason I initially wrote the test case.
    Any idea about why a managed component inside a JScrollPane fails to
    report its actual size after a call to getSize() is really appreciated.

-- 
           Summary: JScrollPane layout issues
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: swing
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hendrich at informatik dot uni-hamburg dot de
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23530




reply via email to

[Prev in Thread] Current Thread [Next in Thread]