< prev index next >

src/demo/share/jfc/J2Ddemo/java2d/demos/Lines/Dash.java

Print this page

        

@@ -1,8 +1,8 @@
 /*
  *
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
  *

@@ -74,15 +74,15 @@
         g2.setStroke(dotted);
         g2.drawRect(3, 3, w - 6, h - 6);
 
         int x = 0;
         int y = h - 34;
-        BasicStroke bs[] = new BasicStroke[6];
+        BasicStroke[] bs = new BasicStroke[6];
 
         float j = 1.1f;
         for (int i = 0; i < bs.length; i++, j += 1.0f) {
-            float dash[] = { j };
+            float[] dash = { j };
             BasicStroke b = new BasicStroke(1.0f, BasicStroke.CAP_BUTT,
                     BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
             g2.setStroke(b);
             g2.drawLine(20, y, w - 20, y);
             bs[i] = new BasicStroke(3.0f, BasicStroke.CAP_BUTT,

@@ -126,9 +126,9 @@
             g2.draw(shape);
             g2.translate(-x, -y);
         }
     }
 
-    public static void main(String argv[]) {
+    public static void main(String[] argv) {
         createDemoFrame(new Dash());
     }
 }
< prev index next >