Click here to Skip to main content
16,011,680 members
Home / Discussions / Java
   

Java

 
QuestionResizing an image of Diamond shape and placing a label inside the image using Swing Pin
PJanaki6-Apr-10 4:14
PJanaki6-Apr-10 4:14 
AnswerRe: Resizing an image of Diamond shape and placing a label inside the image using Swing Pin
TorstenH.7-Apr-10 1:02
TorstenH.7-Apr-10 1:02 
GeneralRe: Resizing an image of Diamond shape and placing a label inside the image using Swing Pin
PJanaki14-Apr-10 2:40
PJanaki14-Apr-10 2:40 
Questionxampp in linux ubuntu Pin
hansoctantan5-Apr-10 16:51
professionalhansoctantan5-Apr-10 16:51 
AnswerRe: xampp in linux ubuntu Pin
David Skelly5-Apr-10 22:15
David Skelly5-Apr-10 22:15 
QuestionXMPP (Building an Instant Messaging Application Using Jabber/XMPP) Pin
Ireland.ir2-Apr-10 8:45
Ireland.ir2-Apr-10 8:45 
QuestionGenerate color scales in java please help!! Pin
codonneem1-Apr-10 5:05
codonneem1-Apr-10 5:05 
AnswerRe: Generate color scales in java please help!! Pin
David Skelly5-Apr-10 22:29
David Skelly5-Apr-10 22:29 
Colour in Java is specified in terms of the proportion of red, green and blue (transparency or alpha comes into it as well but you can ignore that if you want to keep things simple). Each value ranges from 0.0 to 1.0. At either end of the scale you have:

new Color(0.0f, 0.0f, 0.0f);  // black
new Color(1.0f, 1.0f, 1.0f); // white


As long as the three values (R, G, B) are all the same, you will end up with a shade of grey. So, progressively lighter shades of grey go:

new Color(0.25f, 0.25f, 0.25f);
new Color(0.5f, 0.5f, 0.5f);
new Color(0.75f, 0.75f, 0.75f);


After that it should just be some simple maths to convert your X value to the required float value to pass in to the constructor to get the required colour. As long as you make all three values the same, it will be grey.
QuestionUnable to start the Tomcat v6.0 Server Pin
Ram Bonala26-Mar-10 3:59
Ram Bonala26-Mar-10 3:59 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
Richard MacCutchan26-Mar-10 5:03
mveRichard MacCutchan26-Mar-10 5:03 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
xxyyjoke26-Mar-10 15:03
xxyyjoke26-Mar-10 15:03 
AnswerRe: Unable to start the Tomcat v6.0 Server Pin
nguyencdoan12-Jan-11 21:14
nguyencdoan12-Jan-11 21:14 
QuestionWhat's Wrong With JDBC Connectivity? Pin
sujan.vb.net25-Mar-10 6:21
sujan.vb.net25-Mar-10 6:21 
AnswerRe: What's Wrong With JDBC Connectivity? Pin
TorstenH.26-Mar-10 3:28
TorstenH.26-Mar-10 3:28 
GeneralRe: What's Wrong With JDBC Connectivity? Pin
sujan.vb.net26-Mar-10 14:31
sujan.vb.net26-Mar-10 14:31 
Questionjsp project Pin
wgjamafu5824-Mar-10 23:56
wgjamafu5824-Mar-10 23:56 
AnswerRe: jsp project Pin
Cedric Moonen25-Mar-10 0:06
Cedric Moonen25-Mar-10 0:06 
GeneralRe: jsp project Pin
wgjamafu5825-Mar-10 0:13
wgjamafu5825-Mar-10 0:13 
GeneralRe: jsp project Pin
Cedric Moonen25-Mar-10 0:50
Cedric Moonen25-Mar-10 0:50 
GeneralRe: jsp project Pin
Richard MacCutchan25-Mar-10 2:32
mveRichard MacCutchan25-Mar-10 2:32 
AnswerRe: jsp project Pin
David Skelly25-Mar-10 2:53
David Skelly25-Mar-10 2:53 
QuestionUseful Java site for reporting Pin
capnrandy24-Mar-10 11:07
capnrandy24-Mar-10 11:07 
QuestionJava projects Pin
dilanka_perera23-Mar-10 4:11
dilanka_perera23-Mar-10 4:11 
AnswerRe: Java projects Pin
Richard MacCutchan23-Mar-10 4:17
mveRichard MacCutchan23-Mar-10 4:17 
QuestionSeam build-file failure Pin
sunil150822-Mar-10 1:26
sunil150822-Mar-10 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.