Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-24-2007, 12:35 PM
Member
 
Join Date: Dec 2007
Posts: 1
jamborta is on a distinguished road
displaying string
hi,

i'm quite new in java, just started to program in swing. one problem i really couldnt solve is that i have a string which i used to display output messages in text mode, it was alligned by adding spaces to them, however it doesnt work in graphical mode cos the spaces have a narrower width than the characters, so the columns are crooked, even if i try to display it in text box. any idea how i could solve it without reconstructing the original output?

thanks for your help,
tom
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-24-2007, 02:41 PM
khamuruddeen's Avatar
Member
 
Join Date: Dec 2007
Posts: 24
khamuruddeen is on a distinguished road
put ur code i cant getting ur answer
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-24-2007, 08:52 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Try using a monospaced font.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-25-2007, 12:24 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
What about tabs?
You can try using tabs.

You can align text of different fonts by using tabs. The escape character for a tab is "\t".
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 02:23 AM
undertow's Avatar
Member
 
Join Date: Jan 2008
Location: Colorado USA
Posts: 12
undertow is on a distinguished road
Send a message via AIM to undertow Send a message via Skype™ to undertow
java text components also like html. ;-) ;-)
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 01-23-2008, 05:43 PM
Member
 
Join Date: Jan 2008
Posts: 1
caixiao1986 is on a distinguished road
i just want to say hello 您好!
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 01-23-2008, 09:15 PM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Welcome caixioa! There's an Introductions forum too you could've said hello in... but anyways, welcome to our community.

See you around.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying characters in many ways. TampaTechGuy New To Java 7 01-02-2008 11:16 PM
Displaying different image types splinter64uk AWT / Swing 1 12-05-2007 10:12 AM
Using java.util.Scanner to search for a String in a String Java Tip Java Tips 0 11-20-2007 06:59 PM
Displaying charts in a jsp Priyanka Java Servlet 1 11-16-2007 12:59 PM
Images not displaying in JSP in IE7 chadscc Advanced Java 0 11-13-2007 05:24 PM


All times are GMT +3. The time now is 04:15 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org