import javax.swing.JOptionPane; public class EvenOrOddTest { //Using main method to carry out the application public static void main(String args[]) { // Add a number String Number= JOptionPane.showInputDialog("Please enter a number:"); int number= Integer.parseInt(Number); // Check Is it a odd or not if (number%2 == 0) { JOptionPane.showInputDialog(null,number + "is even", JOptionPane.PLAIN_MESSAGE); } if (number%2 == 1) {JOptionPane.showInputDialog(null,number + "is odd", JOptionPane.PLAIN_MESSAGE); } } // end of method main } // end the class