mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8210739: Calling JSpinner's setFont with null throws NullPointerException
Reviewed-by: psadhukhan
This commit is contained in:
parent
0ed2c6c295
commit
518f32791a
4 changed files with 107 additions and 9 deletions
|
@ -769,7 +769,7 @@ public class JSpinner extends JComponent implements Accessible
|
|||
// the text field font was not set by the user
|
||||
Font font = spinner.getFont();
|
||||
if (!newfont.equals(font)) {
|
||||
getTextField().setFont(new FontUIResource(font));
|
||||
getTextField().setFont(font == null ? null : new FontUIResource(font));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue