Skip to main content

Javadoc typo's in javax.swing.Jcomponent and java.awt.Container

4 replies [Last post]
biehl
Offline
Joined: 2003-06-19
Points: 0

JComponent - getGraphics - missing "to" in "Use this method ___ get a Graphics "

Component - getComponentZOrdering - missing > in "Returns:the z-order inde
x of the component; otherwise
returns -1 if the component is nullSince:
1.5"

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ndcosta
Offline
Joined: 2004-05-21
Points: 0

Thanks for spotting these typo's. We have recorded these details under the bug report - 6324943. This report should be available in a couple of days on bug parade http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6324943 .

Message was edited by: ndcosta

biehl
Offline
Joined: 2003-06-19
Points: 0

One more.

There seems to be an undocumented (but useful?) public static method

valueOf(String arg0)

on java.lang.Enum

Thanks
Anders

ndcosta
Offline
Joined: 2004-05-21
Points: 0

Are you refering to the public static > T valueOf(Class enumType, String name) method ??

Available at -
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html#valueOf(java.lang.Class,%20java.lang.String)

biehl
Offline
Joined: 2003-06-19
Points: 0

Sorry, it was a thinko by me.. the method I wanted documentation for is not in java.lang.Enum - it is generated by the compiler. Hrm. Maybe _that_ could be documented in java.lang.Enum ...

++++++++++++++++++

anders@salt ~/devel/02220 $ cat EnumTest.java
import java.lang.reflect.Method;

public enum EnumTest {
A();
public static void main(String[] args) {
Method[] methods = EnumTest.class.getDeclaredMethods();
for (Method method : methods) {
System.out.println(method.toGenericString());
}
}
}
anders@salt ~/devel/02220 $ /opt/jdk1.5.0_03/bin/javac EnumTest.java
anders@salt ~/devel/02220 $ java EnumTest
public static void EnumTest.main(java.lang.String[])
public static EnumTest EnumTest.valueOf(java.lang.String)
public static final EnumTest[] EnumTest.values()
anders@salt ~/devel/02220 $