Change the CUI program into java GUI or graphical user interface, choice change into button click | Sololearn: Learn to code for FREE!

0

Change the CUI program into java GUI or graphical user interface, choice change into button click

package met; import java.util.Scanner; public class Abarochomonten { public static void main (String [] args ) { Scanner sc= new Scanner (System.in); System.out.println(" For Java tutoral Enter 1\n For Java program Enter 2\n"); int c; c=sc.nextInt(); switch(c) { case 1: System.out.println("Java is a general-purpose,\n object-oriented programming language"); /*designed for having lesser implementation dependencies.");*/ break ; case 2: System.out.println("Check even or odd number"); } }}

8/28/2021 5:21:14 PM

JEMBERU ELIAS

1 Answer

New Answer

+1

It's a lot more complicated than tweaking your code. It involves a total rewrite. To learn more about creating Java gui applications using Java Swing see... https://docs.oracle.com/javase/tutorial/uiswing/index.html