Results 1 to 5 of 5

Thread: Weird Error?

  1. #1
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default Weird Error?

    Hi,

    I wanted to see how Dr. JAVA worked, so I got some code for it here: (Apparently I can't post links :( )
    I tried running it in Dr. JAVA, but I got 8 errors?

    Pretty much this over and over:

    File: /Users/myname/Documents/Matches.java [line: 116]
    Warning: [deprecation] size() in java.awt.Component has been deprecated

    What's going on?

    Thanks.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    The code you are using apparently is using a deprecated method, size, that Sun is trying to phase out of Java. Future versions of Java may not support this method, and programs that use the method may crash. Best to go to the API for the class that is calling that method and read what it states about it. It will often say why it is being deprecated and usually states what can be called in its place. Best of luck, and HTH.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Adding more, the API explain what's the alternative you have. sciguy77, you can follows those suggestion in safer way.

  4. #4
    csrajmohan is offline Member
    Join Date
    Jan 2009
    Posts
    1
    Rep Power
    0

    Thumbs up Introduction

    hai i am rajmohan and i am a beginner to java i expect help from all members of the forums.......thank u.........

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by csrajmohan View Post
    hai i am rajmohan and i am a beginner to java i expect help from all members of the forums.......thank u.........
    Welcome to our community.

    Please read our FAQ page before posting again here in this forum, it's really helpful to you. Actually you have choose the wrong sub-forum to introduce yourself. So please choose the correct forum next time. And also please don't post your questions on others thread if your one is not related to.

    Good luck!

Similar Threads

  1. weird location of ovals
    By diggitydoggz in forum New To Java
    Replies: 6
    Last Post: 12-24-2008, 01:25 AM
  2. Weird problem upon calling same function twice
    By alin_ms in forum New To Java
    Replies: 2
    Last Post: 12-20-2008, 07:14 PM
  3. need help, weird question kinda.
    By carlos123 in forum New To Java
    Replies: 6
    Last Post: 01-22-2008, 04:19 AM
  4. Weird data output
    By Shaolin in forum New To Java
    Replies: 12
    Last Post: 12-11-2007, 05:27 PM
  5. weird looking shape JButton is it possible?
    By unhurt in forum AWT / Swing
    Replies: 8
    Last Post: 11-03-2007, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •