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

<hr size=1> is treated like <hr size=2> in JLabel etc.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6u10
    • client-libs

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      If you do
        new JButton("<html>test<hr noshade size=1>")
      the height of the hr painted is actually 2 pixels, and that is because of this line in HRuleView:

      size = Math.max(2, size);

      It would be nice to be able to get 1 pixel <hr>s.

      If you change it to "Math.max(1, size)", you probably also need to also make a minor modification in the method paint(Graphics g, Shape a), for the normal case (<hr> without the "noshade" option).


      REPRODUCIBILITY :
      This bug can be reproduced always.

            peterz Peter Zhelezniakov
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: