Help with Stopping a thread
<p>Here is the code I'm using.</p>

<pre><code>public class timerApp {
Runnable timerRun = new runX();
Thread thread1 = new Thread(timerRun);
public static void main(String[] args) {
    timerApp xyz = new timerApp();
    xyz.createGUI();
}
public void createGUI() {
    JButton button = new JButton("Start timer");
    JButton button2 = new JButton("Stop timer");
    JFrame frame = new JFrame();
    JLabel label = new JLabel("under_construction");
    frame.getContentPane().add(BorderLayout.NORTH,button);
    frame.getContentPane().add(BorderLayout.SOUTH,button2);
    frame.getContentPane().add(BorderLayout.CENTER,label);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(500,500);
    frame.setVisible(true);
    button.addActionListener(new b1L());
    button2.addActionListener(new b2L());
}
public class b1L implements ActionListener {
    public void actionPerformed(ActionEvent event) {
        thread1.start();
    }
}
public class b2L implements ActionListener {
    public void actionPerformed(ActionEvent event) {
        thread1.stop();
    }
  }
}
</code></pre>

<p>I get an error <code>Note: timerApp.java uses or overrides a deprecated API.  Note: Recompile with Xlint:deprecation for details.</code>
I started getting this after adding the stop button's listener class.</p>

<p>RELP!</p>
