• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jdk 1.4 problem

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everyone
i have a project, and i used to compile it with jdk 1.3
now i wanted to upgrade to jdk 1.4, and so when i try to compile it, it shows a warning about a method called "setNextFocusableComponent", by what i understood it doesent support this method anymore,
my question is what method should i use instead?
thanks
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the api
setNextFocusableComponent
has been deprecated in favour of FocusTravesalPolicy. The methods of java.awt.Container of which javax.swing.JComponent is a subclass include setFocusTraversalPolicy(). Why don't you give that a try?
[ March 12, 2004: Message edited by: Carlos Failde ]
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To make this more explicit: when an API method is "deprecated", this basically means that there's a new, better alternative and, while the method still exists, you should change your code to use the new method if possible.
Note that JDK 1.2, introduced in 1998, was the first JDK to introduce the notion of deprecated APIs in Java. That was six years ago. To this date, no deprecated APIs have ever actually been removed from the JDK -- so there's no imminent danger that if you use a deprecated API, your program will stop working in the next point release.
 
Tal Tal
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, i'll check it out
 
I don't always make ads but when I do they're tiny
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic