Solved

tabs in String in dlg box

Posted on 2008-10-23
2
805 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
  • 2
2 Comments
 
LVL 24

Accepted Solution

by:
sciuriware earned 500 total points
Comment Utility
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
Comment Utility
:))
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now