setUndecorated not found

I'm sure I'm doing something stupid, but for the life of me, I don't see it.

public class myApp extends applet implements ComponentListener, Runnable, WindowListener {
...
   run() {
      Frame myFrame = new Frame( title );
      myFrame.setUndecorated( true );
      ...
   }
}

I'm getting a compile error: "cannot resolve symbol" on the setUndecorated() method.
I'm compiling under v1.4.2_06. This method has existed since 1.4.

What am I missing?
softechnicsAsked:
Who is Participating?
 
TimYatesCommented:
setUndecorated only exists in JDK 1.4+

I guess you are using 1.3 or less...

There's nothing you can do about this (AFAIK)

Apart from upgrade to 1.4+
0
 
zzynxSoftware engineerCommented:
>> I'm getting a compile error: "cannot resolve symbol" on the setUndecorated() method.
Sure it is on the setUndecorated() method?

Can you post the exact compiler error?
0
 
CEHJCommented:
That's only available in Frame >= Java 1.4
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
TimYatesCommented:
hehe...darn...too late ;-)
0
 
softechnicsAuthor Commented:
Read the question, guys. I'm compiling under 1.4.2_06.
0
 
CEHJCommented:
>> I'm compiling under 1.4.2_06

I doubt it ;-)
0
 
TimYatesCommented:
You can't be...otherwise it would work...

Either that, or

      Frame myFrame = new Frame( title );

is creating an object of class something.whatever.Frame, NOT java.awt.Frame
0
 
TimYatesCommented:
Try changing:

   run() {
      Frame myFrame = new Frame( title );
      myFrame.setUndecorated( true );

to:

   run() {
      Frame myFrame = new Frame( title );
      // myFrame.setUndecorated( true ); -- put this back later
      System.out.println( myFrame.getClass().getName() ) ;
      System.out.println( System.getProperty( "java.version" ) ) ;

What does it say in the java console window?
0
 
softechnicsAuthor Commented:
I found the problem. I'm compiling using ANT. The BUILD.XML file is overriding my environment variables and is compiling using an earlier java package (v1.1.8). The BUILD file was provided to me by another division within our company - not mine.
0
 
TimYatesCommented:
I think CEHJ deserved half the points with this question :-/

Glad you got it sorted though...
0
 
CEHJCommented:
>> I think CEHJ deserved half the points with this question

Only half? ;-)
0
 
TimYatesCommented:
hehehe ;-P  ;-)

ok then...60/40....my final offer ;-)
0
 
CEHJCommented:
OK - done ;-)
0
 
softechnicsAuthor Commented:
Tell me how and I'll make it happen.
0
 
TimYatesCommented:
hehehe  

*spits on palm*

;-)
0
 
TimYatesCommented:
I've asked for this question to be reopened, hopefully Venabili (the page editor) will be along in a moment or two..

Then there's a "Split Points" link just above the comment entry box which you will be able to click, and divide the points up :-)

It seems fair as we both were answering simultaneously :-D
0
 
softechnicsAuthor Commented:
Is 50/50 agreeable to you both?
0
 
CEHJCommented:
OK ;-)
0
 
TimYatesCommented:
Thanks! :-)  Hope you have a restful weekend :-)
0
 
VenabiliCommented:
Nope. Working the whole weekend. And trying to clean up and catch up in the PE staff at the same time.. :)

And you are welcome.
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.