DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: Tab Stop

  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Tab Stop

    Hello,

    I am a little confused in why the tab Horizontal tab escape sequence works in the command line but not in MessageDialog.

    e.g.

    System.out.println( "Name" + "\tAddress" );

    outputs the following in the command line

    Name Address

    Whilst...

    JOptionPane.showMessageDialog( null, "Name" + "\tAddress" );

    displays the following in a message dialog

    NameAddress

    anyone know why this happens and or how i can get around this?

    new line "\n" works in both cases so just wondering why tab doesn't.

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    You just can't use tabs in JOptionPane messages. (It doesn't really make sense to use them there).
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Aug 2003
    Posts
    5
    Ok thanks at least i know that now.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links