🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages Started by jazzy Sun, 18 Apr 2004 18:36
Using JOptionPane
#1045
Author: jazzy
Date: Sun, 18 Apr 2004 18:36
93 lines
2535 bytes
Hi,

I am new to Java Programming and I am trying to write code using JOption
pane to prompt user to type information and then have string output command
to display information on the screen.
I am able to prompt for typing the information but the display does not
work. Here is my sample code:

**

/**

 * <p>TitleTesting</p>

 * <p>Descriptio: Display Movie list</p>

 *

 */

//Print Address Labels

import javax.swing.JOptionPane;



public class Homework1 {

  public Homework1() {



  }

  public static void main(String[] args) {

    String movieName;

    String theaterName;





  //Enter Movie Name

  String movieName =

      JOptionPane.showInputDialog(

      null, "Enter the Name of the Movie ",

      "Example 1.0 Input",

      JOptionPane.QUESTION_MESSAGE);

//Enter Name

 String directorName=

     JOptionPane.showInputDialog(

     null, "Enter Name of Director ",

     "Example 1.1 Input",

     JOptionPane.QUESTION_MESSAGE);

//Display  Name of  Movie and Director



    String output =   movieName+ directorName

        JOptionPane.showMessageDialog(null,output,"Example 1.2 output",

                                 JOptionPane.INFORMATION_MESSAGE);

  System.exit(0);









  }



}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads