User Profile
Collapse
-
thanks ZMBD.. i am new to programming so i might not be very clear at defining the problem.. i was trying to make a program where i can enter a number using JOptionPane, the scanner takes in the input, system checks if the number is prime or not and shows the result in another messagebox.. so far, i have been able to enter a number but i have not been able to make the scanner take the input from the messagebox and return a value.. am i being clear... -
dynamiser started a topic trying to use JOptionPane as the input mode to find out if the input number isin Javatrying to use JOptionPane as the input mode to find out if the input number is
i was trying to use JOptionPane as the input mode to find out if the input number is prime or not.. but i am stuck with this code..
...Code:package primeNo; import java.util.Scanner; import javax.swing.JOptionPane; public class primeNo { public static void main(String[] args) { int num; JOptionPane.showInputDialog("Please enter a number : "); Scanner user_num1=new Scanner(System.in); -
dynamiser started a topic i was trying to use JOptionPane as the input mode to find out if the input number isin Javai was trying to use JOptionPane as the input mode to find out if the input number is
i was trying to use JOptionPane as the input mode to find out if the input number is prime or not.. but i am stuck with this code..
...Code:package primeNo; import java.util.Scanner; import javax.swing.JOptionPane; public class primeNo { public static void main(String[] args) { int num; JOptionPane.showInputDialog("Please enter a number : "); Scanner user_num1=new Scanner(System.in);
No activity results to display
Show More
Leave a comment: