Package jpotter.test

Source Code of jpotter.test.TestFuck

package jpotter.test;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.Field;
import java.util.Vector;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.Timer;

/**
* Date: 27 Mar 2011
* Time: 15:26:38
* @author Thomas Michel
*/
public class TestFuck {

  public static void main(String[] args) throws Exception{
    Fuck f = new Fuck();
    Field field = Fuck.class.getDeclaredField("lol");
    field.setAccessible(true);
    f.add("hihi");
    f.add("ahah");
    f.display();
    ((Vector<?>)field.get(f)).clear();
    f.display();
    JFrame fr = new JFrame();
    fr.setSize(200, 200);
    final Timer timer = new Timer(2000, new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent e) {
        System.out.println("in");
      }
    });
    timer.setRepeats(false);
    JButton button = new JButton("time");
    button.addActionListener(new ActionListener() {
     
      @Override
      public void actionPerformed(ActionEvent e) {
        if(!timer.isRunning())
          timer.start();
        else System.out.println("already running");
      }
    });
    fr.add(button);
    fr.setVisible(true);
  }
}
TOP

Related Classes of jpotter.test.TestFuck

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.