title: How to put button where I want on screen.
body: <p>Okay I want to place my button in a certain place on the screen. Is there any way to place it at an exact pixel location? Right now it places it to the far right of my screen. I have an image that I would want it to go over too. </p>
  
  <pre><code>import java.awt.AWTException;
  import java.awt.FlowLayout;
  import java.awt.Rectangle;
  import java.awt.Robot;
  import java.awt.Toolkit;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.awt.event.InputEvent;
  import java.awt.image.BufferedImage;
  import java.awt.image.DataBuffer;
  import java.awt.image.DataBufferInt;
  import java.awt.image.WritableRaster;
  
  import javax.swing.BorderFactory;
  import javax.swing.ImageIcon;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JOptionPane;
  
  public class UnfollowGUI extends JFrame{
  
  private JLabel label;
  private JButton button;
  
  private ImageIcon bgi;
  private JLabel bgl;
  
  public static Rectangle gameSquare;
  
  public static boolean rock = true;
  public static boolean runningMine = true;
  public static int stray = 0;
  public static int strayCount = 0;
  
  
  public static void main(String[] args) {
      UnfollowGUI gui = new UnfollowGUI ();
      gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // when click x close program
      //gui.setSize(886, 266);
      gui.pack();
      gui.setVisible(true);
      gui.setTitle("Solid Cloud Inc - Twitter Unfolower");
  }
  
  public UnfollowGUI(){
  
      setLayout(new FlowLayout());
  
      bgi = new ImageIcon(getClass().getResource("tu.png"));
      bgl = new JLabel (bgi);
      add(bgl);
  
      ImageIcon start = new ImageIcon(getClass().getResource("start.png"));
      button = new JButton (start);
      button.setBorder(BorderFactory.createEmptyBorder());
      button.setContentAreaFilled(false);
  
      add(button);
  
      label = new JLabel ("");
      add(label);
  
      Events e = new Events();
      button.addActionListener(e);
  }
  
  public class Events implements ActionListener {
  
  
      public void actionPerformed(ActionEvent e) {
  
          if (e.getSource() == button) {
             label.setText("Searching");
             try {
              Unfollow();
          } catch (InterruptedException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
          }
  }
  
  }
  </code></pre>