Singular To Plural & Number To Words
<pre><code>import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;


public class ComboBoxDemo extends JFrame {
private String[] choice = {
"Singular To Plural", "Number To Words"
};

private JTextField textfield1 = new JTextField
("MY PROJECT");

private JTextField textfield2 = new JTextField(15);
private JComboBox comboBox = new JComboBox();

private int count = 0;

public ComboBoxDemo()
{
for(int i = 0; i &lt; choice.length; i++)
comboBox.addItem(choice[count++]);
textfield1.setEditable(false);

comboBox.addActionListener(new ActionListener())
{
public void actionPerformed(ActionEvent e) {
int a;
textfield2.setText(" "+     
((JComboBox)e.getSource()).getSelectedItem()"\nEnter a value:"+a);
}
}

setLayout(new FlowLayout());
add(textfield1);
add(textfield2);
add(comboBox); 
}

public static void main(String[] args) 
{
setFrame(new ComboBoxDemo(), 500, 500);
}

public static void
setFrame(final JFrame frame, final int width, final int height)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run() {
frame.setTitle(frame.getClass().getSimpleName());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(width, height);
frame.setVisible(true);
}
}
}

}
</code></pre>

<p>i dont know where to put my arguments for the Singular To Plural &amp; Number To Words. im new in java programming, so im really having trouble with this. and i also like to put the output in a text field. i really need a big help :( im working on my project. and also, is it possible to put 2 actionlistener?</p>
