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

REGRESSION: JToggleButton in JToolbar has no border when setRollover(true)

XMLWordPrintable

    • b22
    • x86
    • windows_2000



        Name: jk109818 Date: 04/07/2003


        FULL PRODUCT VERSION :
        java version "1.4.2-beta"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
        Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

        FULL OS VERSION :
        Microsoft Windows 2000 [Version 5.00.2195]


        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Using Windows Look and Feel. Have tried using command line switch to disable XP look and feel enhancements- it makes no difference.

        A DESCRIPTION OF THE PROBLEM :
        If a JToggleButton is added to a JToolBar and the toolbar is operating in setRollover(true) mode, the toggle button's behaviour is wrong.

        In 1.4.1, the button would retain its lowered bevel border when it is "selected". This is the correct behaviour. JToggleButton, must, by its very nature, have a distinct state for on and off. In a rollover-style toolbar, the "!selected" state is no border painted. The "selected" state is a lowered bevel painted.

        The behaviour in 1.4.1 was correct and matched how Windows itself handles toolbars. My Guess is the L&F updates in 1.4.2 Beta have broken this.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Create toolbar
        setRollover(true)
        Add JToggleButton

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        JToggleButton should have no border when off, and a lowered bevel border when on.
        JToggleButton has no border when off or on.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        Workaround would be to code your own MouseListener and not use the setRollover(true) on JToolBar.

        Release Regression From : 1.4.1_02
        The above release value was the last known release where this
        bug was known to work. Since then there has been a regression.

        (Review ID: 183518)
        ======================================================================

              leifs Leif Samuelsson (Inactive)
              jkimsunw Jeffrey Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: