Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JOptionPane.showMessageDialog() help

843810Apr 27 2005 — edited May 16 2005
I am trying to do a search on names inwhich i input into a file and then show them on a joptionpane. My problem is that I can't get it to run b/c it says that i have incompatable types. Please help if at all possible.

String name, custid, num, result;
int id, element;


public void search(){

num = JOptionPane.showInputDialog("Enter Customer ID:");
id = Integer.parseInt(num);
name = tree.lookUp(id);
result = JOptionPane.showMessageDialog(null,new JTextArea(name));

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2005
Added on Apr 27 2005
2 comments
95 views