Guest User

Untitled

a guest
Nov 21st, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.awt.*;
  3. import java.awt.event.*;
  4.  
  5. public class ALTest extends JApplet implements ActionListener
  6. {
  7. JButton button;
  8. public void init()
  9. {
  10. button = new JButton("Example");
  11. button.addActionListener(this);
  12.  
  13. setLayout(new FlowLayout());
  14. add(button);
  15. }
  16.  
  17. public void actionPerformed(ActionEvent e)
  18. {
  19. JOptionPane.showMessageDialog(null, "This was an example");
  20. }
  21. }
Add Comment
Please, Sign In to add comment