Extracting a String from a TextArea in Java, (using EasyApp)
<p>The method .getText(); does not work, and nor does the paramContext();</p>

<p>Basically i need to have a large amount of text inputted in (so i used TextArea, as TextField is not big enough) and i need to then store that information in a String. So i can manipulate it. </p>

<p>Is it possible for me just to leave it as a type textArea? and still extract words and phrases from it?</p>

<p>Heres the code:</p>

<pre><code>    import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
 import java.util.Scanner;
 import java.io.*;

 public class EmailExtractionGUI extends EasyApp
 {
    private TextArea emailInput = new TextArea("", 0,0, TextArea.SCROLLBARS_VERTICAL_ONLY);

    public static void main(String[] args)
    {
        new EmailExtractionGUI();
    }
                                            //Left,Height position,width,height
    Label passwordEntry = addLabel("Email Extraction Programme", 200,50,350,30,this);
    //TextArea emailInput = addTextArea("",75,100,600,550,this);

    Button bGo = addButton("Go",650,680,65,30,this);
    Button bReset = addButton("Reset",575,680,65,30,this);

    public EmailExtractionGUI()
    {
        setSize(750,750);
        setTitle("Email Extraction");
        setBackground(Color.white);
        Font Andalus = new Font("Andalus", 3, 24);// 1st number here 1=bold, 2=italics,3=bold&amp;italics, 0=norm
        passwordEntry.setForeground(Color.blue);
        passwordEntry.setFont(Andalus);
        emailInput.setBackground(Color.white);

    }

    public void actions(Object source, String command)
    {
        if (source == bGo)
        {
            String emailText = emailInput.getText();
        //  Emails email = new Emails(emailText);
        System.out.println(emailText);
        }
</code></pre>

<p>Thanks in Advance!</p>
