NPH

Melotron,

Here is an example of the code you need:

[CODE]import javax.swing.JOptionPane;

public class Test
{
public static void main(String[] a)
{
//get first string from user
String indata1 = JOptionPane.showInputDialog("Enter text");

    //get second string from user
    String indata2 = JOptionPane.showInputDialog("Enter text");

    //check length
    if( indata1.length() > indata2.length())
    {
        System.out.println("The longest is " + indata1);
    }
    else if( indata1.length() < indata2.length())
    {
        System.out.println("The longest is " + indata2);
    }
    else
    {
        System.out.println("They are the same length");
    }
}

}[/CODE]
:?: For more help, [url]www.NeedProgrammingHelp.com[/url]

jwenting commented: don't do people's homework, let them think for themselves. +0