Displaying Text in a Dialog Box
In this program, will we be showing you how to use JAVA program to display a text using JAVA GUI (Graphics User Interface) in a dialog box. Typically,dialog boxes are windows in which programs display important messages to the user of the program. This application uses Java's Class JOptionPane which provides prepackaged dialog boxes that enables programs to display windows containing messages to its user. we will be using the import javax.swing. JOptionPane which is an import declaration and is part of the Java API . Programmers use import declarations to identify the predefined classes used in Java Program. The import declaration help the compiler locate the classes you intend to use, this tells the compiler that our program uses class JOptionPane from package javax.swing and this package helps programmers create graphical user interfaces (GUI) for applications. The program below illustrates how to create a text in a dialog box...