I'm trying to write a Java Applet that prompts the user to enter the radius of a circle, then displays its diameter, circumference, and area. I have no idea on how I should proceed with this. Can...
Type: Posts; User: jasonxman
I'm trying to write a Java Applet that prompts the user to enter the radius of a circle, then displays its diameter, circumference, and area. I have no idea on how I should proceed with this. Can...
Thanks I figured it out. Had nothing to do with null, it was a matter of fixing the if statement.
How do I tell what values that showInputDialog can return?
showInputDialog = 1?
I have no idea what I'm doing wrong can you show me the code that is correct.
import javax.swing.JOptionPane;
public class Assign2
{
// main method begins execution of Java...
I tried inputting this code in after string name2
if(name.isEmpty() || name2.isEmpty()){
// Execute error code
JOptionPane.showMessageDialog(null, "Error: You need to fill in both...
Sorry, still can't figure it out. If you were to explain to me showing code I would appreciate it.
What I'm trying to figure out is "How do I make it where if the user hits Cancel on either first or last name, show an error message. ( The one with an X )
Here is my code:
import...