Yeah Yeah where have I been and such, right now I need epic help with Java coding
For some reason, when i compile this code i get an error such as
if(cmd.equals("Red)
^
(http://i31.tinypic.com/qq8y2o.jpg)
some retarded error.
Here's the code if anyone can help
if(cmd.equals("red"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMagmaLookAndFeel")
}
if(cmd.equals("Blue"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel")
}
}
if(cmd.equals("Black"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel")
}
if(cmd.equals("Green"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceEmeraldDuskLookAndFeel")
}
if(cmd.equals("White"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceCremeLookAndFeel")
}
if(cmd.equals("Grey"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceMistAquaLookAndFeel")
}
What now? Does a try block need {} or not? At a few places opened the brackets, but never closed them.
A try block needs both {} and a catch(){} block. I already went over it with him. It seems that he doesn't have all the necessary resources that this GUI uses, because after we fixed this part, he got like 40-some errors.
if(cmd.equals("Blue"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel")
}
}
there's your error. Get rid of the last } and it should work.
Quote from: legacyblade on July 12, 2009, 04:41:05 pm
if(cmd.equals("Blue"))
{
try{UIManager.setLookAndFeel("org.jvnet.substance.skin.SubstanceBusinessBlueSteelLookAndFeel")
}
}
there's your error. Get rid of the last } and it should work.
Not necessarily. The original used wrong indentation every other line >_>
guys, the whole thing is messed up. I already went over it with him. The one dead giveaway is that there aren't any semicolons. :roll:
Quote from: winkio on July 12, 2009, 05:27:09 pm
guys, the whole thing is messed up. I already went over it with him. The one dead giveaway is that there aren't any semicolons. :roll:
lawlz. I didn't even look at it that hard, I just asked for the full file and cried at it. =P
Maybe I should invest some time into learning to actually focus on the code I'm working on, hmm...