Solved

tabs in String in dlg box

Posted on 2008-10-23
2
809 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pagenation logic how it is working in my code 1 82
Detect Closed Loops (circles, figure-8s, etc) in PNG Images 6 97
jmeter usage 4 68
Java class and jar 3 61
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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Suggested Courses

752 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