🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1045

Using JOptionPane

#1045
From: 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);









  }



}
Technical Details
Message-ID: <OUzgc.23944$LP2.13272@newssvr27.news.prodigy.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.com.POSTED!35c511ab!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,d0caf7b472ab9d86,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-04-18 11:37:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr27.news.prodigy.com.POSTED!35c511ab!not-for-mail
From: "jazzy" <jazzym999@yahoo.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Using JOptionPane
Lines: 100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <OUzgc.23944$LP2.13272@newssvr27.news.prodigy.com>
NNTP-Posting-Host: 64.164.8.250
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr27.news.prodigy.com 1082313390 ST000 64.164.8.250 (Sun, 18 Apr 2004 14:36:30 EDT)
NNTP-Posting-Date: Sun, 18 Apr 2004 14:36:30 EDT
Organization: SBC http://yahoo.sbc.com
X-UserInfo1: SCSYASNDTZRABQXYKROX[PP@[Z_FBL@MAHU^_BAMEH]TCDYG^WHKAH_[JTXDX_KI\VB]JBVMS^YT_G[CZVWAOS\DHFWEH]@KGXYHB\_CMDSFABP^J[AHHRKARLE_JDBLJ\XA[JRMEI]MGJSPB\Y]^KG\@S^@VQKI_Q[G@@_ACSARASDEFLBJ]S\GFNTUAVBL
Date: Sun, 18 Apr 2004 18:36:30 GMT