提交 f9520d17 编写于 作者: S serb

8013820: JavaDoc for JSpinner contains errors

Reviewed-by: azvegint, alexsch
上级 371ca36c
/* /*
* Copyright (c) 2000, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -42,8 +42,6 @@ import java.text.spi.NumberFormatProvider; ...@@ -42,8 +42,6 @@ import java.text.spi.NumberFormatProvider;
import javax.accessibility.*; import javax.accessibility.*;
import sun.util.locale.provider.LocaleProviderAdapter; import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleResources; import sun.util.locale.provider.LocaleResources;
import sun.util.locale.provider.LocaleServiceProviderPool;
/** /**
* A single line input field that lets the user select a * A single line input field that lets the user select a
...@@ -77,12 +75,12 @@ import sun.util.locale.provider.LocaleServiceProviderPool; ...@@ -77,12 +75,12 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* try { * try {
* spinner.commitEdit(); * spinner.commitEdit();
* } * }
* catch (ParseException pe) {{ * catch (ParseException pe) {
* // Edited value is invalid, spinner.getValue() will return * // Edited value is invalid, spinner.getValue() will return
* // the last valid value, you could revert the spinner to show that: * // the last valid value, you could revert the spinner to show that:
* JComponent editor = spinner.getEditor() * JComponent editor = spinner.getEditor();
* if (editor instanceof DefaultEditor) { * if (editor instanceof DefaultEditor) {
* ((DefaultEditor)editor).getTextField().setValue(spinner.getValue(); * ((DefaultEditor)editor).getTextField().setValue(spinner.getValue());
* } * }
* // reset the value to some known value: * // reset the value to some known value:
* spinner.setValue(fallbackValue); * spinner.setValue(fallbackValue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册