6515713: example in JFormattedTextField API docs instantiates abstract class
authorserb
Tue, 20 Jan 2015 17:01:18 +0300
changeset 28989 27fc7c9b745b
parent 28988 5694c83d3060
child 28990 2656e19f0cd6
6515713: example in JFormattedTextField API docs instantiates abstract class Reviewed-by: azvegint, alexsch
jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Sat Jan 17 20:53:35 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java	Tue Jan 20 17:01:18 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import java.io.*;
 import java.text.*;
 import java.util.*;
-import javax.swing.UIManager;
 import javax.swing.event.*;
 import javax.swing.plaf.UIResource;
 import javax.swing.text.*;
@@ -151,7 +150,7 @@
  * will be created to handle formatting of numbers:
  * <pre>
  *   JFormattedTextField tf = new JFormattedTextField();
- *   tf.setValue(new Number(100));
+ *   tf.setValue(100);
  * </pre>
  * <p>
  * <strong>Warning:</strong> As the <code>AbstractFormatter</code> will