Hey guys! I created a dialog box the prompts the user to input a name. I want that name to be displayed in a textarea. How do I accomplish this? And is displaying it in a textarea right or do I use something else like say a textpane?
Here's my code btw:
Here's the the MouseClicked event. When the user clicks in the scrollpane, this pops up.
private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {
String str = JOptionPane.showInputDialog(null, "Enter tag: ");
if(str != null)
JOptionPane.showMessageDialog(null, "You entered the tag : " + str);
}
I'm not sure event should I use under the textarea in order for the input to display. Btw, I'm using NetBeans. Thanks guys!