Title: import java.awt.*; import java.awt.event.*; import javax.swing.*; public Author: QuestionsGuy Pastebin link: http://pastebin.com/n1ByHSa7 First Edit: Monday 10th of February 2014 08:30:30 AM CDT Last Edit: Monday 10th of February 2014 08:30:30 AM CDT import java.awt.*; import java.awt.event.*; import javax.swing.*;   public class GUIForJava extends JFrame {       private final JButton SearchButton;       public GUIForJava () {         this.setTitle("Findit");         this.setSize(600, 400);         this.setDefaultCloseOperation(EXIT_ON_CLOSE);         Container contents = this.getContentPane();         contents.setLayout(new BorderLayout());         JPanel body = new JPanel();         this.add(body, BorderLayout.NORTH);         SearchButton = new JButton("Search");         body.add(SearchButton);         ActionListener SearchAction = new ButtonAction();         SearchButton.addActionListener(SearchAction);             }         private class ButtonAction implements ActionListener{         public void actionPerformed (ActionEvent e) {             JOptionPane.showMessageDialog(null,"You pressed: "+e.getActionCommand());         }     }             public static void main (String[] args) {         JFrame frame = new GUIForJava();         frame.setVisible(true);     } }