Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
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 02-01-2008, 06:35 PM
Member
 
Join Date: Jan 2008
Posts: 6
TampaTechGuy is on a distinguished road
Returning a string (Partly Bold)
Ok here is my deal --

I am a little new at this and still learning, so keep it as informative as possible please (include imports, etc).

I have a public class

public class BoldMyString {
protected String getLetterBody() {
return "This string is not bold. This string is bold.\r\rNow this string is not bold.";

}


How do I get "This string is bold" to show up in bold lettering??

Thanks All.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-01-2008, 07:11 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Displaying
Hello TampaTechGuy

If you want to display text with bold styling, then you must use a graphical user interface or GUI. I don't think that console programs where designed for formatting the style of text. (example: Windows Command Prompt)
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-01-2008, 07:24 PM
Member
 
Join Date: Jan 2008
Posts: 6
TampaTechGuy is on a distinguished road
Its part of a web application I'm working on --

There are pieces of it that use:

new Font(Font.TIMES_ROMAN, 8, Font.ITALIC)));

but I am stuck on how to apply this to my code in a different class.

*but bold, not italic of course.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-03-2008, 10:54 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
Graphics
Hello TampaTechGuy

I would use the Graphics class to draw text. Then you can add any formatting that you can think of! See the last picture in this thread. I formated the text and added some layout so that it is displayed around images. You can do this if you like, but Swing or AWT components will offer a faster solution.
__________________
If your ship has not come in yet then build a lighthouse.
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
Need help returning data from database dyn03 Database 0 03-11-2008 05:55 PM
JNI - passing and returning parameters by value java_to_c New To Java 0 01-31-2008 09:49 PM
How to add interceptor to persistent ejb entity to add check before returning values umen Enterprise JavaBeans 0 12-01-2007 12:55 AM
returning to a previously saved view gojava Advanced Java 0 11-09-2007 06:11 PM
selectSingleNode not returning element... schu777 XML 4 07-31-2007 06:19 PM


All times are GMT +3. The time now is 01:59 AM.


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