Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- public class ALTest extends JApplet implements ActionListener
- {
- JButton button;
- public void init()
- {
- button = new JButton("Example");
- button.addActionListener(this);
- setLayout(new FlowLayout());
- add(button);
- }
- public void actionPerformed(ActionEvent e)
- {
- JOptionPane.showMessageDialog(null, "This was an example");
- }
- }
Add Comment
Please, Sign In to add comment