@@ -0,0 +1,1346 @@
+package com.test;%0D%0A%0D%0Aimport java.awt.Container;%0D%0Aimport java.awt.FlowLayout;%0D%0Aimport java.awt.event.ActionEvent;%0D%0Aimport java.awt.event.ActionListener;%0D%0Aimport java.awt.event.KeyEvent;%0D%0Aimport java.awt.event.KeyListener;%0D%0A%0D%0Aimport javax.swing.JButton;%0D%0Aimport javax.swing.JFrame;%0D%0Aimport javax.swing.JTextField;%0D%0A%0D%0Apublic class TestJFrame extends JFrame %7B%0D%0A%09%0D%0A%09private static final long serialVersionUID = 1L;%0D%0A%0D%0A%09public void test() %7B%0D%0A%09%09final JTextField ft = new JTextField();%0D%0A%09%09JButton jb = new JButton();%0D%0A%09%09Container cc = getContentPane();%0D%0A%09%09cc.setLayout(new FlowLayout());%0D%0A%09%09ft.setText(%22Hello World%22);%0D%0A%09%09jb.setText(%22Clean%22);%0D%0A%09%09this.getContentPane().add(ft);%0D%0A%09%09this.getContentPane().add(jb);%0D%0A%09%09%0D%0A%09%09jb.addActionListener(new ActionListener() %7B%0D%0A%09%09%09%0D%0A%09%09%09@Override%0D%0A%09%09%09public void actionPerformed(ActionEvent e) %7B%0D%0A%09%09%09%09ft.setText(%22%22);%09%09%09%09%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A%09%09%0D%0A%09%09ft.addKeyListener(new KeyListener() %7B%0D%0A%09%09%09%0D%0A%09%09%09@Override%0D%0A%09%09%09public void keyTyped(KeyEvent kee) %7B%0D%0A%09%09%09%09char ch = kee.getKeyChar();%0D%0A%09%09%09%09System.out.println(ch);%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09@Override%0D%0A%09%09%09public void keyReleased(KeyEvent e) %7B%0D%0A%09%09%09%09%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09@Override%0D%0A%09%09%09public void keyPressed(KeyEvent e) %7B%0D%0A%09%09%09%09%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A%09%7D%0D%0A%09%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09TestJFrame tj = new TestJFrame();%09%09%0D%0A%0D%0A%09%09tj.setSize(200, 300);%0D%0A%09%09tj.setVisible(true);%0D%0A%09%09tj.test();%0D%0A%09%7D%0D%0A%7D%0D%0A

test file