Index
02 (296)
Kratochvil Stanisław Psychoterapia Kierunki metody badania (11)
Lampart poluje w ciemnoÂści
Orson Scott Card Flux Tales of Human Futures
Brown Dan Kod Leonarda Da Vinci
Jonathan Carroll Czarny koktail i inne opowiadania
Gabriela Zapolska Sezonowa miłoÂść
elektronika praktyczna 2001 2
Verne Juliusz Dwa lata wakacji
Przesylka z Salonik
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • lenka007.xlx.pl

  • [ Pobierz całość w formacie PDF ]
    .Display page for TrackEvent at www.BruceEckel.comTrackEvent.javaNo Java 2 support for APPLET!!//: c13:TrackEvent.java// Show events as they happen.// <applet code=TrackEvent// width=700 height=500></applet>import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.util.*;import com.bruceeckel.swing.*;public class TrackEvent extends JApplet {HashMap h = new HashMap();String[] event = {"focusGained", "focusLost", "keyPressed","keyReleased", "keyTyped", "mouseClicked","mouseEntered", "mouseExited","mousePressed","mouseReleased", "mouseDragged", "mouseMoved"};MyButtonb1 = new MyButton(Color.blue, "test1"),b2 = new MyButton(Color.red, "test2");class MyButton extends JButton {void report(String field, String msg) {((JTextField)h.get(field)).setText(msg);}FocusListener fl = new FocusListener() {public void focusGained(FocusEvent e) {report("focusGained", e.paramString());}public void focusLost(FocusEvent e) {report("focusLost", e.paramString());}};KeyListener kl = new KeyListener() {public void keyPressed(KeyEvent e) {report("keyPressed", e.paramString());}public void keyReleased(KeyEvent e) {report("keyReleased", e.paramString());}public void keyTyped(KeyEvent e) {report("keyTyped", e.paramString());}};MouseListener ml = new MouseListener() {public void mouseClicked(MouseEvent e) {report("mouseClicked", e.paramString());}public void mouseEntered(MouseEvent e) {report("mouseEntered", e.paramString());}public void mouseExited(MouseEvent e) {report("mouseExited", e.paramString());}public void mousePressed(MouseEvent e) {report("mousePressed", e.paramString());}public void mouseReleased(MouseEvent e) {report("mouseReleased", e.paramString());}};MouseMotionListener mml =new MouseMotionListener() {public void mouseDragged(MouseEvent e) {report("mouseDragged", e.paramString());}public void mouseMoved(MouseEvent e) {report("mouseMoved", e.paramString());}};public MyButton(Color color, String label) {super(label);setBackground(color);addFocusListener(fl);addKeyListener(kl);addMouseListener(ml);addMouseMotionListener(mml);}}public void init() {Container c = getContentPane();c.setLayout(new GridLayout(event.length+1,2));for(int i = 0; i < event.length; i++) {JTextField t = new JTextField();t.setEditable(false);c.add(new JLabel(event[i], JLabel.RIGHT));c.add(t);h.put(event[i], t);}c.add(b1);c.add(b2);}public static void main(String[] args) {Console.run(new TrackEvent(), 700, 500);}} ///:~ [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • aceton.keep.pl
  • 
    Wszelkie Prawa Zastrzeżone! Kawa była słaba i bez smaku. Nie miała treści, a jedynie formę. Design by SZABLONY.maniak.pl.