Untitled

 avatar
unknown
plain_text
4 years ago
494 B
5
Indexable
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

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

public class MyFrame extends JFrame implements ActionListener {
	
	MyFrame () {
		System.out.println("Hi");
		
		JButton button = new JButton("Przycisk");
	
		this.add(button);
		button.addActionListener(this);
		
		this.setSize(400,400);
		this.setVisible(true);
	}
	
	
 	public void actionPerformed(ActionEvent arg0) {
		System.out.println("Siema1");
 	}
	

;
}
Editor is loading...