Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Dialog Box Output

This is very similar to the first program, but it actually does something. The additional parts are described below.

Tutorial Details:

import
One strength of Java is that it has many libraries or packages of predefined classes and methods to help you do things. Some of these are automatically known in every Java program, but you have to explicitly import others. This import statement tells the compiler that you will be using part of the Graphical User Interface (GUI) library - everything in javax.swing. Typical programs have a few import statements.

This line displays this dialog box. The predefined Java class, JOptionPane contains methods to display dialog boxes. A method is a group of Java statements for doing one particular thing. The "." following the class name is followed by the name of the method, showMessageDialog. Every method call must be followed by a parenthesized list of comma-separated arguments (often called parameters) that specify information the method needs to perform its task.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/examples-introductory/dialog/program2.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Dialog Box Output

View Tutorial:
Dialog Box Output

Related Tutorials:

Java gets serial support with the new javax.comm package - JavaWorld - May 1998
Java gets serial support with the new javax.comm package - JavaWorld - May 1998
 
Java Tip 72: Press Escape to close your Swing dialog windows
Java Tip 72: Press Escape to close your Swing dialog windows
 
Java gets serial support with the new javax.comm package
Java gets serial support with the new javax.comm package
 
Java Tip 85: Fun and games with JFileChooser - JavaWorld
Java Tip 85: Fun and games with JFileChooser - JavaWorld
 
Process XML with JavaBeans, Part 3 - JavaWorld January 2000
Process XML with JavaBeans, Part 3 - JavaWorld January 2000
 
Add a file finder accessory to JFileChooser - JavaWorld
Add a file finder accessory to JFileChooser - JavaWorld
 
Use HTTPS in your Java client code - JavaWorld
Use HTTPS in your Java client code - JavaWorld
 
Printing in Java, Part 1 - JavaWorld October 2000
Printing in Java, Part 1 - JavaWorld October 2000
 
Printing in Java, Part 2 - JavaWorld December 2000
Printing in Java, Part 2 - JavaWorld December 2000
 
Printing in Java, Part 3 - JavaWorld January 2001
Printing in Java, Part 3 - JavaWorld January 2001
 
Printing in Java, Part 4 - JavaWorld February 2001
Printing in Java, Part 4 - JavaWorld February 2001
 
Java security evolution and concepts, Part 5
Java security evolution and concepts, Part 5
 
Evolve your apps with the Phased Process pattern
Evolve your apps with the Phased Process pattern
 
Take command of your software
Take command of your software
 
Big designs for small devices
Big designs for small devices
 
Very interesting article
Very interesting article
 
Interesting ...
Interesting ...
 
Nice widget
Nice widget
 
Just Forms PDF library
The JustFormsPDF library is a Java class library for filling or editing interactive PDF forms on-the-fly. Empower your applications with the industry-standard PDF forms technology using JustFormsPDF.
 
Creating Wizard Dialogs with Java Swing
Wizard dialogs are ubiquitous in today's desktop applications. This article creates a framework for a simple wizard dialog, complete with Back, Next, and Cancel buttons that you can extend for use in your applications as necessary.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.