• Post Reply Bookmark Topic Watch Topic
  • New Topic

jdk 1.4 problem  RSS feed

 
Tal Tal
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
Carlos Failde
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
thanks, i'll check it out
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!