Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Deprecated API

Deprecated Classes
LineNumberInputStream This class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers. 
StringBufferInputStream This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class. 
 

Deprecated Interfaces
Certificate A new certificate handling package is created in JDK1.2. This Certificate interface is entirely deprecated and is here to allow for a smooth transition to the new package. 
 

Deprecated Fields
java.awt.Frame.CROSSHAIR_CURSOR replaced by Cursor.CROSSHAIR_CURSOR
java.awt.Frame.DEFAULT_CURSOR replaced by Cursor.DEFAULT_CURSOR
java.awt.Frame.E_RESIZE_CURSOR replaced by Cursor.E_RESIZE_CURSOR
java.awt.Frame.HAND_CURSOR replaced by Cursor.HAND_CURSOR
java.lang.SecurityManager.inCheck This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.awt.Frame.MOVE_CURSOR replaced by Cursor.MOVE_CURSOR
java.awt.Frame.N_RESIZE_CURSOR replaced by Cursor.N_RESIZE_CURSOR
java.awt.Frame.NE_RESIZE_CURSOR replaced by Cursor.NE_RESIZE_CURSOR
java.awt.Frame.NW_RESIZE_CURSOR replaced by Cursor.NW_RESIZE_CURSOR
java.awt.Frame.S_RESIZE_CURSOR replaced by Cursor.S_RESIZE_CURSOR
java.awt.Frame.SE_RESIZE_CURSOR replaced by Cursor.SE_RESIZE_CURSOR
java.awt.Frame.SW_RESIZE_CURSOR replaced by Cursor.SW_RESIZE_CURSOR
java.awt.Frame.TEXT_CURSOR replaced by Cursor.TEXT_CURSOR
java.awt.Frame.W_RESIZE_CURSOR replaced by Cursor.W_RESIZE_CURSOR
java.awt.Frame.WAIT_CURSOR replaced by Cursor.WAIT_CURSOR
 

Deprecated Methods
java.awt.Component.action As of JDK version 1.1, should register this component as ActionListener on component which fires action events. 
java.security.Identity.addCertificate Use the new addCertificate method instead. 
java.security.Identity.addCertificate Use the new addCertificate method instead. 
java.awt.List.addItem replaced by add(String)
java.awt.List.addItem replaced by add(String, int)
java.awt.BorderLayout.addLayoutComponent replaced by addLayoutComponent(Component, Object)
java.awt.CardLayout.addLayoutComponent replaced by addLayoutComponent(Component, Object)
java.awt.List.allowsMultipleSelections As of JDK version 1.1, replaced by isMultipleMode()
java.awt.TextArea.appendText As of JDK version 1.1, replaced by append(String)
java.awt.Component.bounds As of JDK version 1.1, replaced by getBounds()
java.security.Identity.certificates Use getCertificates instead. 
java.lang.SecurityManager.classDepth This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.lang.SecurityManager.classLoaderDepth This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.awt.List.clear As of JDK version 1.1, replaced by removeAll()
java.awt.Container.countComponents As of JDK version 1.1, replaced by getComponentCount(). 
java.awt.Choice.countItems As of JDK version 1.1, replaced by getItemCount()
java.awt.List.countItems As of JDK version 1.1, replaced by getItemCount()
java.awt.Menu.countItems As of JDK version 1.1, replaced by getItemCount()
java.awt.MenuBar.countMenus As of JDK version 1.1, replaced by getMenuCount()
java.lang.ClassLoader.defineClass Replaced by defineClass(java.lang.String, byte[], int, int) 
java.awt.List.delItem replaced by remove(String) and remove(int)
java.awt.List.delItems As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method. 
java.awt.Component.deliverEvent As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
java.awt.Container.deliverEvent As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e) 
java.awt.Component.disable As of JDK version 1.1, replaced by setEnabled(boolean)
java.awt.MenuItem.disable As of JDK version 1.1, replaced by setEnabled(boolean)
java.awt.Component.enable As of JDK version 1.1, replaced by setEnabled(boolean)
java.awt.Component.enable As of JDK version 1.1, replaced by setEnabled(boolean)
java.awt.MenuItem.enable As of JDK version 1.1, replaced by setEnabled(boolean)
java.awt.MenuItem.enable As of JDK version 1.1, replaced by setEnabled(boolean)
java.security.SignatureSpi.engineGetParameter  
java.security.SignatureSpi.engineSetParameter Replaced by engineSetParameter
java.awt.Polygon.getBoundingBox As of JDK version 1.1, replaced by getBounds()
java.lang.String.getBytes This method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via the getBytes(String enc) method, which takes a character-encoding name, or the getBytes() method, which uses the platform's default encoding. 
java.awt.Graphics.getClipRect As of JDK version 1.1, replaced by getClipBounds()
java.awt.CheckboxGroup.getCurrent As of JDK version 1.1, replaced by getSelectedCheckbox()
java.awt.Frame.getCursorType As of JDK version 1.1, replaced by Component.getCursor()
java.util.Date.getDate As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_MONTH)
java.sql.Time.getDate  
java.util.Date.getDay As of JDK version 1.1, replaced by Calendar.get(Calendar.DAY_OF_WEEK)
java.sql.Time.getDay  
java.lang.System.getenv The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding getTypeName methods of the Boolean, Integer, and Long primitive types. For example:
     String classPath = System.getProperty("java.class.path",".");
 
if (Boolean.getBoolean("myapp.exper.mode")) enableExpertCommands();
 
java.awt.image.BufferedImage.getGraphics  
java.sql.Date.getHours  
java.util.Date.getHours As of JDK version 1.1, replaced by Calendar.get(Calendar.HOUR_OF_DAY)
java.lang.SecurityManager.getInCheck This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.awt.swing.AbstractButton.getLabel - Replaced by getText() 
java.awt.Scrollbar.getLineIncrement As of JDK version 1.1, replaced by getUnitIncrement()
java.lang.Runtime.getLocalizedInputStream As of JDK 1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the InputStreamReader and BufferedReader classes. 
java.lang.Runtime.getLocalizedOutputStream As of JDK 1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the OutputStreamWriter, BufferedWriter, and PrintWriter classes. 
java.sql.DriverManager.getLogStream  
java.awt.FontMetrics.getMaxDecent As of JDK version 1.1.1, replaced by getMaxDescent()
java.sql.Date.getMinutes  
java.util.Date.getMinutes As of JDK version 1.1, replaced by Calendar.get(Calendar.MINUTE)
java.util.Date.getMonth As of JDK version 1.1, replaced by Calendar.get(Calendar.MONTH)
java.sql.Time.getMonth  
java.awt.Scrollbar.getPageIncrement As of JDK version 1.1, replaced by getBlockIncrement()
javax.servlet.ServletRequest.getParameter Please use getParameterValues 
java.security.Signature.getParameter  
java.awt.Component.getPeer As of JDK version 1.1, programs should not directly manipulate peers. replaced by boolean isDisplayable()
java.awt.MenuComponent.getPeer As of JDK version 1.1, programs should not directly manipulate peers. 
java.sql.Date.getSeconds  
java.util.Date.getSeconds As of JDK version 1.1, replaced by Calendar.get(Calendar.SECOND)
javax.servlet.ServletContext.getServlets Please use getServletNames in conjunction with getServlet 
java.util.Date.getTimezoneOffset As of JDK version 1.1, replaced by Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)
java.sql.ResultSet.getUnicodeStream  
java.sql.ResultSet.getUnicodeStream  
java.awt.Scrollbar.getVisible As of JDK version 1.1, replaced by getVisibleAmount()
java.util.Date.getYear As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900
java.sql.Time.getYear  
java.awt.Component.gotFocus As of JDK version 1.1, replaced by processFocusEvent(FocusEvent). 
java.awt.Component.handleEvent As of JDK version 1.1 replaced by processEvent(AWTEvent). 
java.awt.Component.hide As of JDK version 1.1, replaced by setVisible(boolean)
java.lang.SecurityManager.inClass This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.lang.SecurityManager.inClassLoader This type of security checking is not recommended. It is recommended that the checkPermission call be used instead. 
java.awt.TextArea.insertText As of JDK version 1.1, replaced by insert(String, int)
java.awt.Container.insets As of JDK version 1.1, replaced by getInsets()
java.awt.Component.inside As of JDK version 1.1, replaced by contains(int, int). 
java.awt.Polygon.inside As of JDK version 1.1, replaced by contains(int, int)
java.awt.Rectangle.inside As of JDK version 1.1, replaced by contains(int, int)
java.lang.Character.isJavaLetter Replaced by isJavaIdentifierStart(char). 
java.lang.Character.isJavaLetterOrDigit Replaced by isJavaIdentifierPart(char). 
java.awt.List.isSelected As of JDK version 1.1, replaced by isIndexSelected(int)
java.lang.Character.isSpace Replaced by isWhitespace(char). 
java.awt.Component.keyDown As of JDK version 1.1, replaced by processKeyEvent(KeyEvent). 
java.awt.Component.keyUp As of JDK version 1.1, replaced by processKeyEvent(KeyEvent). 
java.awt.Component.layout As of JDK version 1.1, replaced by doLayout()
java.awt.Container.layout As of JDK version 1.1, replaced by doLayout()
java.awt.ScrollPane.layout As of JDK version 1.1, replaced by doLayout()
java.awt.Component.locate As of JDK version 1.1, replaced by getComponentAt(int, int). 
java.awt.Container.locate As of JDK version 1.1, replaced by getComponentAt(int, int)
java.awt.Component.location As of JDK version 1.1, replaced by getLocation()
java.awt.Component.lostFocus As of JDK version 1.1, replaced by processFocusEvent(FocusEvent). 
java.awt.Component.minimumSize As of JDK version 1.1, replaced by getMinimumSize()
java.awt.Container.minimumSize As of JDK version 1.1, replaced by getMinimumSize()
java.awt.List.minimumSize As of JDK version 1.1, replaced by getMinimumSize(int)
java.awt.List.minimumSize As of JDK version 1.1, replaced by getMinimumSize()
java.awt.TextArea.minimumSize As of JDK version 1.1, replaced by getMinimumSize(int, int)
java.awt.TextArea.minimumSize As of JDK version 1.1, replaced by getMinimumSize()
java.awt.TextField.minimumSize As of JDK version 1.1, replaced by getMinimumSize(int)
java.awt.TextField.minimumSize As of JDK version 1.1, replaced by getMinimumSize()
java.awt.Component.mouseDown As of JDK version 1.1, replaced by processMouseEvent(MouseEvent). 
java.awt.Component.mouseDrag As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent). 
java.awt.Component.mouseEnter As of JDK version 1.1, replaced by processMouseEvent(MouseEvent). 
java.awt.Component.mouseExit As of JDK version 1.1, replaced by processMouseEvent(MouseEvent). 
java.awt.Component.mouseMove As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent). 
java.awt.Component.mouseUp As of JDK version 1.1, replaced by processMouseEvent(MouseEvent). 
java.awt.Component.move As of JDK version 1.1, replaced by setLocation(int, int)
java.awt.Rectangle.move As of JDK version 1.1, replaced by setLocation(int, int)
java.awt.Component.nextFocus As of JDK version 1.1, replaced by transferFocus(). 
java.util.Date.parse As of JDK version 1.1, replaced by DateFormat.parse(String s)
java.awt.Component.postEvent As of JDK version 1.1, replaced by dispatchEvent(AWTEvent). 
java.awt.MenuComponent.postEvent As of JDK version 1.1, replaced by dispatchEvent(AWTEvent)
java.awt.MenuContainer.postEvent As of JDK version 1.1 replaced by dispatchEvent(AWTEvent). 
java.awt.Window.postEvent As of JDK version 1.1 replaced by dispatchEvent(AWTEvent)
java.awt.Component.preferredSize As of JDK version 1.1, replaced by getPreferredSize()
java.awt.Container.preferredSize As of JDK version 1.1, replaced by getPreferredSize()
java.awt.List.preferredSize As of JDK version 1.1, replaced by getPreferredSize(int)
java.awt.List.preferredSize As of JDK version 1.1, replaced by getPreferredSize()
java.awt.TextArea.preferredSize As of JDK version 1.1, replaced by getPreferredSize(int, int)
java.awt.TextArea.preferredSize As of JDK version 1.1, replaced by getPreferredSize()
java.awt.TextField.preferredSize As of JDK version 1.1, replaced by getPreferredSize(int)
java.awt.TextField.preferredSize As of JDK version 1.1, replaced by getPreferredSize()
java.io.DataInputStream.readLine This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
 
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 
 
java.io.ObjectInputStream.readLine This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives. 
java.rmi.registry.RegistryHandler.registryImpl As of JDK 1.2, RMI no longer uses the RegistryHandler to obtain the registry's implementation. 
java.rmi.registry.RegistryHandler.registryStub As of JDK 1.2, RMI no longer uses the RegistryHandler to obtain the registry's stub. 
java.security.Identity.removeCertificate Use the new removeCertificate method instead. 
java.security.Identity.removeCertificate Use the new removeCertificate method instead. 
java.awt.TextArea.replaceText As of JDK version 1.1, replaced by replaceRange(String, int, int)
java.awt.Component.reshape As of JDK version 1.1, replaced by setBounds(int, int, int, int)
java.awt.Rectangle.reshape As of JDK version 1.1, replaced by setBounds(int, int, int, int)
java.awt.Component.resize As of JDK version 1.1, replaced by setSize(int, int)
java.awt.Component.resize As of JDK version 1.1, replaced by setSize(Dimension)
java.awt.Rectangle.resize As of JDK version 1.1, replaced by setSize(int, int)
java.lang.Thread.resume  
java.lang.ThreadGroup.resume  
java.awt.CheckboxGroup.setCurrent As of JDK version 1.1, replaced by setSelectedCheckbox(Checkbox)
java.awt.Frame.setCursor As of JDK version 1.1, replaced by Component.setCursor(Cursor)
java.util.Date.setDate As of JDK version 1.1, replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date)
java.sql.Time.setDate  
java.awt.TextField.setEchoCharacter As of JDK version 1.1, replaced by setEchoChar(char)
java.sql.Date.setHours  
java.util.Date.setHours As of JDK version 1.1, replaced by Calendar.set(Calendar.HOUR_OF_DAY, int hours)
java.awt.swing.AbstractButton.setLabel - Replaced by setText(text) 
java.awt.Scrollbar.setLineIncrement As of JDK version 1.1, replaced by setUnitIncrement(int)
java.sql.DriverManager.setLogStream  
java.sql.Date.setMinutes  
java.util.Date.setMinutes As of JDK version 1.1, replaced by Calendar.set(Calendar.MINUTE, int minutes)
java.util.Date.setMonth As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month)
java.sql.Time.setMonth  
java.awt.List.setMultipleSelections As of JDK version 1.1, replaced by setMultipleMode(boolean)
java.awt.Scrollbar.setPageIncrement As of JDK version 1.1, replaced by setBlockIncrement()
java.security.Signature.setParameter Use setParameter
java.sql.Date.setSeconds  
java.util.Date.setSeconds As of JDK version 1.1, replaced by Calendar.set(Calendar.SECOND, int seconds)
java.sql.PreparedStatement.setUnicodeStream  
java.util.Date.setYear As of JDK version 1.1, replaced by Calendar.set(Calendar.YEAR, year + 1900)
java.sql.Time.setYear  
java.awt.Component.show As of JDK version 1.1, replaced by setVisible(boolean)
java.awt.Component.show As of JDK version 1.1, replaced by setVisible(boolean)
java.awt.Component.size As of JDK version 1.1, replaced by getSize()
java.lang.Thread.stop  
java.lang.Thread.stop  
java.lang.ThreadGroup.stop  
java.lang.Thread.suspend  
java.lang.ThreadGroup.suspend  
java.util.Date.toGMTString As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone
java.util.Date.toLocaleString As of JDK version 1.1, replaced by DateFormat.format(Date date)
java.io.ByteArrayOutputStream.toString This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the toString(String enc) method, which takes an encoding-name argument, or the toString() method, which uses the platform's default character encoding. 
java.util.Date.UTC As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec), using a UTC TimeZone, followed by Calendar.getTime().getTime()
 

Deprecated Constructors
java.sql.Date  
java.util.Date As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date) or GregorianCalendar(year + 1900, month, date)
java.util.Date As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min) or GregorianCalendar(year + 1900, month, date, hrs, min)
java.util.Date As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec) or GregorianCalendar(year + 1900, month, date, hrs, min, sec)
java.util.Date As of JDK version 1.1, replaced by DateFormat.parse(String s)
java.io.PrintStream As of JDK 1.1, the preferred way to print text is via the PrintWriter class. Consider replacing code of the
form   PrintStream p = new PrintStream(out);
with   PrintWriter p = new PrintWriter(out); 
java.io.PrintStream As of JDK 1.1, the preferred way to print text is via the PrintWriter class. Consider replacing code of the
form   PrintStream p = new PrintStream(out, autoFlush);
with   PrintWriter p = new PrintWriter(out, autoFlush); 
java.net.Socket Use DatagramSocket instead for UDP transport. 
java.net.Socket Use DatagramSocket instead for UDP transport. 
java.io.StreamTokenizer As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:
   Reader r = new BufferedReader(new InputStreamReader(is));
   StreamTokenizer st = new StreamTokenizer(r);
 
 
java.lang.String This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding. 
java.lang.String This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via the String constructors that take a character-encoding name or that use the platform's default encoding. 
java.sql.Timestamp  
 


Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.