User Profile

Collapse

Profile Sidebar

Collapse
dynamiser
dynamiser
Last Activity: Oct 16 '12, 01:47 AM
Joined: Sep 14 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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...
    See more | Go to post

    Leave a comment:


  • 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);
    ...
    See more | Go to post

  • i 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);
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 6 '12, 04:14 PM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...