how to change font color in labels using java!?

change color using JFrame/labels

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 3782 Views - Last Post: 21 April 2010 - 10:01 PM Rate Topic: -----

#16 chosen_12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 11-November 09

Re: how to change font color in labels using java!?

Posted 21 April 2010 - 06:56 PM

View Postmacosxnerd101, on 21 April 2010 - 06:09 AM, said:

First, please properly indent your code. As an example, having three ending parentheses and a brace on the same line is a little hard to follow and match themm up to their starting pairs.

What line(s) are you getting this error on? Can you post the compiler errors?



I'm using notepad++ so it's a little bit easy to see which parenthesis and braces would be pared!
All I'm wondering is how can i change the font color of the labels!
(i would want to change it to RED, because i have a darker background color!!)

as stated above, I've tried a lot of codes and it doesn't work!
always saying identifier expected!
( i doesn't know which identifier to use! )
can u suggest a code for it!
and the identifier of the code!
please!
Was This Post Helpful? 0
  • +
  • -

#17 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10646
  • View blog
  • Posts: 39,536
  • Joined: 27-December 08

Re: how to change font color in labels using java!?

Posted 21 April 2010 - 07:55 PM

Quote

I'm using notepad++ so it's a little bit easy to see which parenthesis and braces would be pared!

Most of us are looking at your code as it is displayed via code tags or copying it into something on par with JCreator or NetBeans. While you can follow it on Notepad++, we can't follow it on code tags. So please keep in mind that when other people are looking at your code, you should format it so they can read it (a big point in the real world).

Quote

All I'm wondering is how can i change the font color of the labels!
(i would want to change it to RED, because i have a darker background color!!)

as stated above, I've tried a lot of codes and it doesn't work!
always saying identifier expected!
( i doesn't know which identifier to use! )
can u suggest a code for it!
and the identifier of the code!
please!

Your description does not help us help you. Great- you are getting the errors. I don't know what lines (the code at the lines, not the line numbers) you are getting errors at. I believe I provided an example towards the start of this thread on how to change the background color. If you still need help, post non-ambiguous error descriptions (I encourage you to copy/paste from your compiler) and your properly indented code as well as we are on a new page.
Was This Post Helpful? 1
  • +
  • -

#18 chosen_12  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 11-November 09

Re: how to change font color in labels using java!?

Posted 21 April 2010 - 10:01 PM

View Postmacosxnerd101, on 21 April 2010 - 06:55 PM, said:

Quote

I'm using notepad++ so it's a little bit easy to see which parenthesis and braces would be pared!

Most of us are looking at your code as it is displayed via code tags or copying it into something on par with JCreator or NetBeans. While you can follow it on Notepad++, we can't follow it on code tags. So please keep in mind that when other people are looking at your code, you should format it so they can read it (a big point in the real world).

Quote

All I'm wondering is how can i change the font color of the labels!
(i would want to change it to RED, because i have a darker background color!!)

as stated above, I've tried a lot of codes and it doesn't work!
always saying identifier expected!
( i doesn't know which identifier to use! )
can u suggest a code for it!
and the identifier of the code!
please!

Your description does not help us help you. Great- you are getting the errors. I don't know what lines (the code at the lines, not the line numbers) you are getting errors at. I believe I provided an example towards the start of this thread on how to change the background color. If you still need help, post non-ambiguous error descriptions (I encourage you to copy/paste from your compiler) and your properly indented code as well as we are on a new page.




sorry!
for all the troubles I've done!
I'm using the cmd.exe to run my program!

all I've wanted is to change the font color of the label's such as ("Costumer I.D. , name , etc..)
yes I've tried all the codes u had given but there's always an error like! " identifier expected! "

sorry I'm a beginner in java!
sorry!

can anyone suggest how to change a fontcolor!?> with the identifier it needs!
Was This Post Helpful? -1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2