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

Username:   Password: 
 RegisterRegister   
 Dialogue Box
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jamonathin




PostPosted: Sun Sep 16, 2007 4:31 pm   Post subject: Dialogue Box

Hey all,

I need to make a dialogue box of some sort. The best way i can put it is i need to do something like this:
c:

for (int i = 0; i < n; i++)
{
    for (int q = 0; q < n; n++)
    {
        printf ("%d ", number[i][q]);
    }
    printf ("\n");
}


Some of that syntax might be wrong, but thats basically what i need to accomplish, and i have no idea how to do that. My prof is keen on using "javax.swing.JOptionPane;" so i hope theres some sort of box thing for that.

and p.s. does the predef 'maxint' (or variation) exist in java?
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Sun Sep 16, 2007 7:12 pm   Post subject: RE:Dialogue Box

Essentially:

Java:
// Import this
import javax.swing.JOptionPane;

// And to use the option pane
JOptionPane.showMessageDialog(null, "What you want the user to see goes here!" );


But instead of printf, use

Java:
JOptionPane.showMessageDialog(null, String.format( stuffhere ) );
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  [ 2 Posts ]
Jump to:   


Style:  
Search: