title: Adding a two simple JLabels to a jframe
body: <p>I have searched everywhere, and there is tons of documentation, but is is all confusing, and half of the test code doesn't work, so I am asking. what is the simplest way to make a jlabel, set its location (with ints or a dimension), and add it to the JFrame</p>
  
  <pre><code>package com.notelek.notify;
  
  import java.awt.Dimension;
  import java.awt.Graphics;
  import java.awt.GraphicsDevice;
  import java.awt.GraphicsEnvironment;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  
  public class Gui {
  
  
  
      public static void main(String[] args){
  
      }
  
      public static void notify(String line1, String line2, String imagepath, int style){
          GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
          int width = gd.getDisplayMode().getWidth();
          int swidth = width - 320;
  
          JFrame notification = new JFrame();
          notification.setSize(new Dimension(320,64));
          notification.setLocation(swidth, 0);
          notification.setUndecorated(true);
          notification.setVisible(true);
  
          JPanel main = new JPanel();
  
          JLabel notifyline1 = new JLabel();
          notifyline1.setText("test");
          notifyline1.setLocation(0, 0);
          main.add(notification);
      }
  
  }
  </code></pre>