|  | 
		
		
		
		
		
			
				| Java Example Program / Sample Source Code 
					
						| import java.awt.BorderLayout; import java.awt.Component;
 import java.awt.EventQueue;
 import java.awt.Frame;
 import java.awt.KeyEventDispatcher;
 import java.awt.KeyboardFocusManager;
 import java.awt.TextField;
 import java.awt.event.KeyEvent;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.util.HashMap;
 import java.util.HashSet;
 
 public class KeyboardFocusManagerExample {
 public HashSet<Component> comps = new HashSet<Component>();
 public HashMap<Integer, Character> swaps = new HashMap<Integer, Character>();
 
 public static void main(String[] args) {
 Runnable r = new Runnable() {
 public void run() {
 Frame frame = new Frame();
 TextField tf = new TextField();
 frame.add(tf, BorderLayout.NORTH);
 TextField tf2 = new TextField();
 frame.add(tf2, BorderLayout.SOUTH);
 KeyboardFocusManagerExample med = new KeyboardFocusManagerExample();
 med.swaps.put(new Integer(KeyEvent.VK_F4), new Character(
 '\u00bd'));
 med.comps.add(tf);
 KeyboardFocusManager.getCurrentKeyboardFocusManager()
 .addKeyEventDispatcher(new KeyEventDispatcher() {
 public boolean dispatchKeyEvent(KeyEvent e) {
 // This example converts all typed keys to upper
 // case
 if (e.getID() == KeyEvent.KEY_TYPED) {
 e.setKeyChar(Character.toUpperCase(e
 .getKeyChar()));
 }
 // If the key should not be dispatched to the
 // focused component, set discardEvent to true
 boolean discardEvent = false;
 return discardEvent;
 }
 });
 frame.addWindowListener(new WindowAdapter() {
 public void windowClosing(WindowEvent e) {
 System.exit(0);
 }
 });
 frame.pack();
 frame.setVisible(true);
 }
 };
 EventQueue.invokeLater(r);
 }
 }
 |  |  |  
				| 
| 
AWTEventMulticaster
How To Use AWTEventMulticasteradd(ActionListener a, ActionListener b) In AWTEventMulticasteradd(AdjustmentListener a, AdjustmentListener b) In AWTEventMulticasteradd(ComponentListener a, ComponentListener b) In AWTEventMulticasteradd(ContainerListener a, ContainerListener b) In AWTEventMulticasteradd(FocusListener a, FocusListener b) In AWTEventMulticasteradd(HierarchyBoundsListener a, HierarchyBoundsListener b) In AWTEventMulticasteradd(HierarchyListener a, HierarchyListener b) In AWTEventMulticasteradd(InputMethodListener a, InputMethodListener b) In AWTEventMulticasteradd(ItemListener a, ItemListener b) In AWTEventMulticasteradd(KeyListener a, KeyListener b) In AWTEventMulticasteradd(MouseListener a, MouseListener b) In AWTEventMulticasteradd(MouseMotionListener a, MouseMotionListener b) In AWTEventMulticasteradd(MouseWheelListener a, MouseWheelListener b) In AWTEventMulticasteradd(TextListener a, TextListener b)  In AWTEventMulticasteradd(WindowFocusListener a, WindowFocusListener b) In AWTEventMulticasteradd(WindowListener a, WindowListener b) In AWTEventMulticasteradd(WindowStateListener a, WindowStateListener b) In AWTEventMulticasteraddInternal(EventListener a, EventListener b) In AWTEventMulticasterremove(ActionListener l, ActionListener oldl) In AWTEventMulticasterremove(AdjustmentListener l, AdjustmentListener oldl) In AWTEventMulticasterremove(ComponentListener l, ComponentListener oldl) In AWTEventMulticasterremove(ContainerListener l, ContainerListener oldl) In AWTEventMulticasterremove(EventListener oldl) In AWTEventMulticasterremove(FocusListener l, FocusListener oldl) In AWTEventMulticasterremove(HierarchyBoundsListener l, HierarchyBoundsListener oldl) In AWTEventMulticasterremove(HierarchyListener l, HierarchyListener oldl) In AWTEventMulticasterremove(InputMethodListener l, InputMethodListener oldl) In AWTEventMulticasterremove(ItemListener l, ItemListener oldl) In AWTEventMulticasterremove(KeyListener l, KeyListener oldl) In AWTEventMulticasterremove(MouseListener l, MouseListener oldl) In AWTEventMulticasterremove(MouseMotionListener l, MouseMotionListener oldl) In AWTEventMulticasterremove(MouseWheelListener l, MouseWheelListener oldl) In AWTEventMulticasterremove(TextListener l, TextListener oldl)  In AWTEventMulticasterremove(WindowFocusListener l, WindowFocusListener oldl) In AWTEventMulticasterremove(WindowListener l, WindowListener oldl) In AWTEventMulticasterremove(WindowStateListener l, WindowStateListener oldl) In AWTEventMulticasterremoveInternal(EventListener l, EventListener oldl) In AWTEventMulticastersave(ObjectOutputStream s, String k, EventListener l)  In AWTEventMulticastersaveInternal(ObjectOutputStream s, String k)  In AWTEventMulticaster 
DefaultFocusTraversalPolicy 
DefaultKeyboardFocusManager 
Graphics
clipRect(int x, int y, int width, int height) In GraphicsdrawArc(int x, int y, int width, int height, int startAngle, int arcAngle) In GraphicsdrawLine(int x1, int y1, int x2, int y2) In GraphicsdrawOval(int x, int y, int width, int height) In GraphicsdrawPolygon(int[] xPoints, int[] yPoints, int nPoints) In GraphicsdrawRect(int x, int y, int width, int height) In GraphicsdrawString(String str, int x, int y) In GraphicsfillArc(int x, int y, int width, int height, int startAngle, int arcAngle) In GraphicsfillOval(int x, int y, int width, int height) In GraphicsfillPolygon(int[] xPoints, int[] yPoints, int nPoints) In GraphicsfillRect(int x, int y, int width, int height) In GraphicsdrawImage(Image img, int x, int y, ImageObserver observer) In GraphicssetColor(Java.awt.Color) In GraphicssetPaintMode() In GraphicssetXORMode(Java.awt.Color) In GraphicssetFont(Java.awt.Font) In Graphics 
GraphicsConfiguration
Using GraphicsConfigurationcreateCompatibleImage(int width, int height) In GraphicsConfigurationcreateCompatibleImage(int width, int height, int transparency) In GraphicsConfigurationcreateCompatibleVolatileImage(int width, int height) In GraphicsConfigurationcreateCompatibleVolatileImage(int width, int height, ImageCapabilities caps) In GraphicsConfigurationcreateCompatibleVolatileImage(int width, int height, ImageCapabilities caps, int transparency) In GraphicsConfigurationcreateCompatibleVolatileImage(int width, int height, int transparency) In GraphicsConfigurationgetBounds() In GraphicsConfigurationgetBufferCapabilities() In GraphicsConfigurationgetColorModel() In GraphicsConfigurationgetColorModel(int transparency) In GraphicsConfigurationgetDefaultTransform() In GraphicsConfigurationgetDevice() In GraphicsConfigurationgetImageCapabilities() In GraphicsConfigurationgetNormalizingTransform() In GraphicsConfigurationisTranslucencyCapable() In GraphicsConfiguration 
MediaTracker
How To Use MediaTrackeraddImage(Image image, int id) In MediaTrackeraddImage(Image image, int id, int w, int h) In MediaTrackercheckAll() In MediaTrackercheckAll(boolean load) In MediaTrackercheckID(int id) In MediaTrackercheckID(int id, boolean load) In MediaTrackergetErrorsAny() In MediaTrackergetErrorsID(int id) In MediaTrackerisErrorAny() In MediaTrackerisErrorID(int id) In MediaTrackerremoveImage(Image image) In MediaTrackerremoveImage(Image image, int id) In MediaTrackerremoveImage(Image image, int id, int width, int height) In MediaTrackerstatusAll(boolean load) In MediaTrackerstatusID(int id, boolean load) In MediaTrackerwaitForAll() In MediaTrackerwaitForAll(long ms) In MediaTrackerwaitForID(int id) In MediaTrackerwaitForID(int id, long ms) In MediaTracker | 
 |  |  |  |