aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes GUI Swing related Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI Swing related" Watch "GUI Swing related" New topic
Author

GUI Swing related

Geetgovind Mav
Greenhorn

Joined: Jul 26, 2008
Posts: 5
Dear friends,
I'm trying to use this statement ----- JFrame.setDefaultLookAndFeelDecorated(true) which is present in JDK1.4. I've Java Tiger & beyond but still this statement does'nt compile. Can anyone help me out as to why this statement is'nt compiling???
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Welcome to JavaRanch

What compiler error are you getting?
Geetgovind Mav
Greenhorn

Joined: Jul 26, 2008
Posts: 5
Thank you Mam,
I am getting Compiler Error : "cannot resolve symbol"
& when I type 'java -version' on command prompt, it says java version "1.6.0_07".
Thanking you in anticipation...

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Which symbol -- JFrame or setDefaultLookAndFeelDecorated? Are you sure everything is spelled correctly?


[Jess in Action][AskingGoodQuestions]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
And what do you get if you type "javac -version"?
Olivier Legat
Ranch Hand

Joined: Nov 17, 2007
Posts: 176

Do what Ritchie is suggesting. type "javac -version". If you're compiler is up to date then post your code, otherwise we won't be able to help you. Remember that the more information you give the better chance of finding the problem


Olly
Geetgovind Mav
Greenhorn

Joined: Jul 26, 2008
Posts: 5
Thanks for your suggestions.
I typed everything correctly. Also, I typed javac -version, but there is an error message javac: invalid flag: -version
What might be the reason???
Some background info....I've run it on Eclipse using JDK 5, & it runs fine in it. But running on Command Prompt is problematic via the Java Compiler.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Geetgovind Mav wrote:Thanks for your suggestions.
Also, I typed javac -version, but there is an error message javac: invalid flag: -version
What might be the reason???


javac didn't have a "-version" switch until JDK 1.5, so the compiler you're using is older than you think. Type this instead and it will tell you the real version:

javac -J-version

(That's javac space dash J dash version).
Geetgovind Mav
Greenhorn

Joined: Jul 26, 2008
Posts: 5
Thank you Ernest!
It seems I've an older compiler JDK 1.3.0_05 . But I've JDK 1.5.0_13 set in my environment variables path.
But still all this while I was compiling via JDK 1.3.0_05???
Olivier Legat
Ranch Hand

Joined: Nov 17, 2007
Posts: 176

Strange indeed. How did you install Java on your computer? Directly from the Java Sun website or copy/pasting it from a friend? I remember my brother once had a similar problem.
Geetgovind Mav
Greenhorn

Joined: Jul 26, 2008
Posts: 5
I had copy/pasted it from a friend. I went to the following site...http://www.java.com/en/download/help/testvm.xml where we get to know our version directly. Its findings were "You have an older version of JRE....Your Java configuration is...Version : Java 6 Update 7"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GUI Swing related