3 Replies - 17654 Views - Last Post: 01 March 2009 - 05:27 PM Rate Topic: -----

#1 nick898  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 17-February 09

Underlining in java

Posted 01 March 2009 - 05:10 PM

Hi!

I was wondering how (if possible) I could underline a char output in Java. For example, I have:




public class stack {
	
  public static void main(String[] args) {
	   
	   char[] one = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', ' J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q'};
	


System.out.println(one);


		
   }
	  
	}



What I was thinking of doing was to underline what gets put through the System.out.println.

Thanks! :D

Is This A Good Question/Topic? 0
  • +

Replies To: Underlining in java

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Underlining in java

Posted 01 March 2009 - 05:12 PM

You can underline on a GUI but not on a console output... unless DOS/Unix has a way so specify to output underline with escape characters
Was This Post Helpful? 1
  • +
  • -

#3 nick898  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 17-February 09

Re: Underlining in java

Posted 01 March 2009 - 05:21 PM

View Postpbl, on 1 Mar, 2009 - 04:12 PM, said:

You can underline on a GUI but not on a console output... unless DOS/Unix has a way so specify to output underline with escape characters



Ahh okay, but out of curiosity what would be the way for it to work on a GUI setup?

Thanks again
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Underlining in java

Posted 01 March 2009 - 05:27 PM

View Postnick898, on 1 Mar, 2009 - 04:21 PM, said:

View Postpbl, on 1 Mar, 2009 - 04:12 PM, said:

You can underline on a GUI but not on a console output... unless DOS/Unix has a way so specify to output underline with escape characters



Ahh okay, but out of curiosity what would be the way for it to work on a GUI setup?

Thanks again

You can always:
- get the component font
- add the underline attribute to thatfont
- set the component font to that new font
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1