Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 question about multi windows
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AHHNOOB




PostPosted: Tue May 04, 2004 5:41 pm   Post subject: question about multi windows

in java u start out wit

import java.applet.*;
import java.awt.*;

is there a command that will allow me to have more then one window
for explain in my game i want first window for the person to enter their name in then the second window would open up displaying the name

how would i do that???
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Tue May 04, 2004 6:41 pm   Post subject: (No subject)

code:

import javax.swing.JOptionPane; //import class JOptionPane

public class name{
public static void main ( String args[] )
{
String name;
//read in name
name =
        JOptionPane.showInputDialog ( "Enter your name" );

//display name
JOptionPane.showMessageDialog (
null, "Your name is " + name, "Name",
JOptionPane.PLAIN_MESSAGE);
System.exit ( 0 ); //terminate the program
}
}
AHHNOOB




PostPosted: Wed May 05, 2004 3:25 pm   Post subject: (No subject)

hey thnx for your help
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: