t38
asked on
Java code to output details input by user not working
Hi, Regarding the Java code below, I want to create a simple GUI that requests the title and author of a book and outputs something like "The title of the book is JAVA FOR DUMMIES and the author is T38" - what am I missing? Thanks
import javax.swing.JOptionPane;
public class GUI {
public static void main (String args[])
{
String title = "";
String author = "";
title = JOptionPane.showInputDialo g("Enter Title");
author = JOptionPane.showInputDialo g("Enter Author");
JOptionPane.showMessageDia log(null, "The title of the book is :", "and the Author of the Book is : " Book Details",JOPtionPane.PLAIN _MESSAGE);
System.exit(0);
}
}
import javax.swing.JOptionPane;
public class GUI {
public static void main (String args[])
{
String title = "";
String author = "";
title = JOptionPane.showInputDialo
author = JOptionPane.showInputDialo
JOptionPane.showMessageDia
System.exit(0);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER