Solved

tabs in String in dlg box

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

770 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