< prev index next >
src/demo/share/jfc/J2Ddemo/java2d/demos/Colors/ColorConvert.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:
*
*** 63,73 ****
*/
@SuppressWarnings("serial")
public class ColorConvert extends Surface {
private static Image img;
! private static Color colors[] = { red, pink, orange,
yellow, green, magenta, cyan, blue };
public ColorConvert() {
setBackground(white);
img = getImage("clouds.jpg");
--- 63,73 ----
*/
@SuppressWarnings("serial")
public class ColorConvert extends Surface {
private static Image img;
! private static Color[] colors = { red, pink, orange,
yellow, green, magenta, cyan, blue };
public ColorConvert() {
setBackground(white);
img = getImage("clouds.jpg");
*** 121,129 ****
g2.drawImage(srcImg, 10, 20, w / 2 - 20, h - 30, null);
g2.drawImage(dstImg, w / 2 + 10, 20, w / 2 - 20, h - 30, null);
}
! public static void main(String s[]) {
createDemoFrame(new ColorConvert());
}
}
--- 121,129 ----
g2.drawImage(srcImg, 10, 20, w / 2 - 20, h - 30, null);
g2.drawImage(dstImg, w / 2 + 10, 20, w / 2 - 20, h - 30, null);
}
! public static void main(String[] s) {
createDemoFrame(new ColorConvert());
}
}
< prev index next >