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

Graphics.fillRect(x,y,w,h) does not fill rectangle when x or y is too small

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description



      Name: kaC94536 Date: 01/27/2000



         The code below should show window with blue background.
      But background of the window is not blue.
         
      ------------------------------ test.java -----------------------------
      import java.awt.*;

      class test extends Frame {
         static int x = -2000000;
         public static void main(String args[]) {
            test f = new test();
            f.setSize(200, 200);
            f.show();
         }
         public void paint(Graphics g) {
            g.setColor(Color.blue);
            g.fillRect(x,0, getBounds().width-x, getBounds().height);
         }
      }

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mbronsonsunw Mike Bronson (Inactive)
              Reporter:
              kanisimosunw Konstantin Anisimov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: