< prev index next >

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

Print this page

        

*** 1,8 **** /* * ! * Copyright (c) 2007, 2011, 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: * --- 1,8 ---- /* * ! * 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: *
*** 51,62 **** * Shows the three different styles of stroke ending. */ @SuppressWarnings("serial") public class Caps extends Surface { ! private static int cap[] = { CAP_BUTT, CAP_ROUND, CAP_SQUARE }; ! private static String desc[] = { "Butt Cap", "Round Cap", "Square Cap" }; public Caps() { setBackground(WHITE); } --- 51,62 ---- * Shows the three different styles of stroke ending. */ @SuppressWarnings("serial") public class Caps extends Surface { ! private static int[] cap = { CAP_BUTT, CAP_ROUND, CAP_SQUARE }; ! private static String[] desc = { "Butt Cap", "Round Cap", "Square Cap" }; public Caps() { setBackground(WHITE); }
*** 73,81 **** tl.draw(g2, (float) (w / 2 - tl.getBounds().getWidth() / 2), (i + 1) * h / 4 - 10); } } ! public static void main(String s[]) { createDemoFrame(new Caps()); } } --- 73,81 ---- tl.draw(g2, (float) (w / 2 - tl.getBounds().getWidth() / 2), (i + 1) * h / 4 - 10); } } ! public static void main(String[] s) { createDemoFrame(new Caps()); } }
< prev index next >