How to split line of numbers
<p>I would like to ask how can i make java to find and export numbers from line of numbers separated with space. So if you paste this kinda number line (0 0 0 56 62 5 1) into text field, java finds numbers and exports them into excel file. </p>

<p>Link to example <a href="https://plus.google.com/photos/104660160652888807492/albums/5866412159231794609?authkey=COajv8jT_7_uuAE" rel="nofollow">photo</a>!</p>

<p>This is the text field i've made:</p>

<pre><code>import javax.swing.*;

public class GUI extends JFrame{

JFrame frame;
JPanel panel;
JMenuBar bar;
JMenu menu;
JMenuItem item, item2;
JTextField field;

public GUI(){
    super("Troop Calculator");
    frame = this;
    panel = new JPanel();
    bar = new JMenuBar();
    menu = new JMenu("Calculate and Import");
    item = new JMenuItem("New...");
    item2 = new JMenuItem("Existing...");
    field = new JTextField("Copy Here", 50);
    frame.add(panel);
    panel.add(field);
    panel.add(bar);
    bar.add(menu);
    menu.add(item);
    menu.add(item2);
}
public static void main(String[] args){
    GUI window = new GUI();
    window.pack();
    window.setDefaultCloseOperation(EXIT_ON_CLOSE);
    window.setVisible(true);
}


}
</code></pre>
