View Single Post
  #2 (permalink)  
Old 05-05-2008, 10:49 PM
danielstoner's Avatar
danielstoner danielstoner is offline
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 183
danielstoner is on a distinguished road
Actually it works but not in the GUI. It works at the console.

Code:
import javax.swing.JOptionPane; public class Ex6 { public static void main(String args[]) { String msg; msg = "N\t10*N\t100*N\t1000*N\n\n"; // \t doesn't seem to be working for some reason... for (int i = 1; i <= 5; i++) { msg += String.format("%d\t%d\t%d\t%d\n", i, i * 10, i * 100, i * 1000); } System.out.println(msg); JOptionPane.showMessageDialog(null, msg); } }
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Reply With Quote