Content of test/microphone/MicrophoneBeanInfo.java extracted from visualap.jar
/* IMPORTANT NOTICE, please read: This software is licensed under the terms of the GNU GENERAL PUBLIC LICENSE, please read the enclosed file license.txt or http://www.gnu.org/licenses/licenses.html Note that this software is freeware and it is not designed, licensed or intended for use in mission critical, life support and military purposes. The use of this software is at the risk of the user. */ package test.microphone; import java.beans.*; import java.lang.reflect.Method; public class MicrophoneBeanInfo extends SimpleBeanInfo { // Here put reference to ICON files (remove if not needed) public java.awt.Image getIcon(int iconKind) { if (iconKind == BeanInfo.ICON_COLOR_16x16) { java.awt.Image img = loadImage("Mike16.png"); return img; } if (iconKind == BeanInfo.ICON_COLOR_32x32) { java.awt.Image img = loadImage("Mike32.png"); return img; } return null; } // Here put reference to supported methods (remove if not needed) public MethodDescriptor[] getMethodDescriptors() { // First find the "method" object. Class args[] = new Class[0]; Method m; try { m = Microphone.class.getMethod("capture", args); } catch (Exception ex) { // "should never happen" throw new Error("Missing method: " + ex); } // Now create the MethodDescriptor array: MethodDescriptor result[] = new MethodDescriptor[1]; result[0] = new MethodDescriptor(m); return result; } }