Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tabs in String in dlg box

Posted on 2008-10-23
2
Medium Priority
?
811 Views
Last Modified: 2012-05-05
I have a string defined like so
String myString = "\t\thello\nsomething else";

When displayed as the text in a dlg box (specifically, JOptionPane.showOptionDialog()), the \n shows up but the tabs are ignored.

What gives?
0
Comment
Question by:allelopath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 24

Accepted Solution

by:
sciuriware earned 2000 total points
ID: 22789907
If you want to create columns in a text on a dialog,
do so using HTML and a table:

<HTML><CENTER><TABLE><TR><TD WIDTH=400>a text</TD>.....................

and so on.
Of course you decide about constants or %% to set the tabbing.

;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 22890718
:))
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question