1 package com.hammurapi.jcapture; 2 3 import java.awt.Frame; 4 5 abstract class Translucener { 6 makeTranslucent(Frame frame)7 protected abstract void makeTranslucent(Frame frame); 8 makeFrameTranslucent(Frame frame)9 static void makeFrameTranslucent(Frame frame) throws Exception { 10 String jVersion = System.getProperty("java.version"); 11 if (jVersion==null || "1.6".equals(jVersion) || jVersion.startsWith("1.6.")) { 12 ((Translucener) Class.forName("com.hammurapi.jcapture.AWTUtilitiesTranslucener").newInstance()).makeTranslucent(frame); 13 } else { 14 ((Translucener) Class.forName("com.hammurapi.jcapture.GraphicsDeviceTranslucener").newInstance()).makeTranslucent(frame); 15 } 16 } 17 } 18