diff --git a/src/demo/share/jfc/SwingSet2/resources/swingset.properties b/src/demo/share/jfc/SwingSet2/resources/swingset.properties index 8ff2c82f813..fa9a8e41ce1 100644 --- a/src/demo/share/jfc/SwingSet2/resources/swingset.properties +++ b/src/demo/share/jfc/SwingSet2/resources/swingset.properties @@ -1,4 +1,4 @@ -# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -438,7 +438,7 @@ ProgressBarDemo.stop_button=Stop Loading Text ProgressBarDemo.accessible_text_loading_progress=Text loading progress ProgressBarDemo.accessible_text_area_name=Text progressively being loaded in -ProgressBarDemo.accessible_text_area_description=This JTextArea is being filled with text from a buffer progressively a character at a time while the progress bar a the bottom of the window shows the loading progress +ProgressBarDemo.accessible_text_area_description=This JTextArea is being filled with text from a buffer progressively a character at a time while the progress bar at the bottom of the window shows the loading progress ProgressBarDemo.text=\ The saying goes: if an infinite number of monkeys typed on an infinite number of typewriters, eventually \n\ @@ -704,4 +704,3 @@ TreeDemo.accessible_description=This demo shows shows a sample usage of a JTree TreeDemo.tooltip=JTree demo TreeDemo.name=Tree Demo TreeDemo.music=Music - diff --git a/src/demo/share/jfc/TableExample/TableExample.java b/src/demo/share/jfc/TableExample/TableExample.java index 561209ef4e5..3a47b3447cb 100644 --- a/src/demo/share/jfc/TableExample/TableExample.java +++ b/src/demo/share/jfc/TableExample/TableExample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,7 +40,7 @@ /** - * A a UI around the JDBCAdaptor, allowing database data to be interactively + * A UI around the JDBCAdaptor, allowing database data to be interactively * fetched, sorted and displayed using Swing. * * NOTE: This example uses a modal dialog via the static convenience methods in diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java index 6f4475b670a..9a2546510b0 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java @@ -1002,7 +1002,7 @@ public class TIFFIFD extends TIFFDirectory { // The IFD entry value is a pointer to the actual field value. long offset = stream.readUnsignedInt(); - // Check whether the the field value is within the stream. + // Check whether the field value is within the stream. if (haveStreamLength && offset + size > streamLength) { continue; } diff --git a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java index f95d1d39424..ca851f5963b 100644 --- a/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java +++ b/src/java.desktop/share/classes/java/awt/CheckboxMenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2022, 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 @@ -214,7 +214,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access } /** - * Returns the an array (length 1) containing the checkbox menu item + * Returns the array (length 1) containing the checkbox menu item * label or null if the checkbox is not selected. * @see ItemSelectable */ diff --git a/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java b/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java index 00e6a9a4a68..e416e791e8d 100644 --- a/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java +++ b/src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java @@ -468,7 +468,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { // in the Window. // // * If we're in SendMessage, then this is a synthetic - // WINDOW_GAINED_FOCUS message which was generated by a + // WINDOW_GAINED_FOCUS message which was generated by // the FOCUS_GAINED handler. Allow the Component to // which the FOCUS_GAINED message was targeted to // receive the focus. diff --git a/src/java.desktop/share/classes/java/awt/Graphics.java b/src/java.desktop/share/classes/java/awt/Graphics.java index 5ed31aeadb0..f0bff604eb3 100644 --- a/src/java.desktop/share/classes/java/awt/Graphics.java +++ b/src/java.desktop/share/classes/java/awt/Graphics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2022, 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 @@ -24,9 +24,6 @@ */ package java.awt; -import java.io.*; -import java.lang.*; -import java.util.*; import java.awt.image.ImageObserver; import java.text.AttributedCharacterIterator; @@ -714,9 +711,9 @@ public abstract class Graphics { * 1 ≤ i ≤ {@code nPoints}. * The figure is automatically closed by drawing a line connecting * the final point to the first point, if those points are different. - * @param xPoints a an array of {@code x} coordinates. - * @param yPoints a an array of {@code y} coordinates. - * @param nPoints a the total number of points. + * @param xPoints an array of {@code x} coordinates. + * @param yPoints an array of {@code y} coordinates. + * @param nPoints the total number of points. * @see java.awt.Graphics#fillPolygon * @see java.awt.Graphics#drawPolyline */ @@ -749,9 +746,9 @@ public abstract class Graphics { *
* The area inside the polygon is defined using an * even-odd fill rule, also known as the alternating rule. - * @param xPoints a an array of {@code x} coordinates. - * @param yPoints a an array of {@code y} coordinates. - * @param nPoints a the total number of points. + * @param xPoints an array of {@code x} coordinates. + * @param yPoints an array of {@code y} coordinates. + * @param nPoints the total number of points. * @see java.awt.Graphics#drawPolygon(int[], int[], int) */ public abstract void fillPolygon(int[] xPoints, int[] yPoints, diff --git a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java index b3683a941ee..f1166e81636 100644 --- a/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java +++ b/src/java.desktop/share/classes/java/awt/color/ICC_ProfileRGB.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2022, 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 @@ -58,7 +58,7 @@ import sun.java2d.cmm.ProfileDeferralInfo; * To transform from a device profile color space to the CIEXYZ Profile * Connection Space, each device color component is first linearized by a lookup * through the corresponding tone reproduction curve (TRC). The resulting linear - * RGB components are converted to the CIEXYZ PCS using a a 3x3 matrix + * RGB components are converted to the CIEXYZ PCS using a 3x3 matrix * constructed from the RGB colorants. *
*
diff --git a/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java b/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java
index ea31203b988..7f54b204987 100644
--- a/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java
+++ b/src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -229,7 +229,7 @@ public final class DropTargetContext implements Serializable {
}
/**
- * This method returns a the currently available DataFlavors
+ * This method returns the currently available DataFlavors
* of the {@code Transferable} operand
* as a {@code java.util.List}.
*
diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java b/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java
index 0c3a2111edf..05cf118fdaf 100644
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -35,7 +35,8 @@
package java.awt.image;
-import static sun.java2d.StateTrackable.State.*;
+import static sun.java2d.StateTrackable.State.STABLE;
+import static sun.java2d.StateTrackable.State.UNTRACKABLE;
/**
* This class extends {@code DataBuffer} and stores data internally as bytes.
@@ -83,7 +84,7 @@ public final class DataBufferByte extends DataBuffer
* banks all of which are the specified size.
*
* @param size The size of the banks in the {@code DataBuffer}.
- * @param numBanks The number of banks in the a {@code DataBuffer}.
+ * @param numBanks The number of banks in the {@code DataBuffer}.
*/
public DataBufferByte(int size, int numBanks) {
super(STABLE, TYPE_BYTE, size, numBanks);
diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java b/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java
index f1f7f8b47ef..90ecf978d80 100644
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -35,7 +35,8 @@
package java.awt.image;
-import static sun.java2d.StateTrackable.State.*;
+import static sun.java2d.StateTrackable.State.STABLE;
+import static sun.java2d.StateTrackable.State.UNTRACKABLE;
/**
* This class extends {@code DataBuffer} and stores data internally
@@ -82,7 +83,7 @@ public final class DataBufferInt extends DataBuffer
* banks, all of which are the specified size.
*
* @param size The size of the banks in the {@code DataBuffer}.
- * @param numBanks The number of banks in the a {@code DataBuffer}.
+ * @param numBanks The number of banks in the {@code DataBuffer}.
*/
public DataBufferInt(int size, int numBanks) {
super(STABLE, TYPE_INT, size, numBanks);
diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java b/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java
index 7b7e21e90b8..4c4ae206068 100644
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -35,7 +35,8 @@
package java.awt.image;
-import static sun.java2d.StateTrackable.State.*;
+import static sun.java2d.StateTrackable.State.STABLE;
+import static sun.java2d.StateTrackable.State.UNTRACKABLE;
/**
* This class extends {@code DataBuffer} and stores data internally as shorts.
@@ -81,7 +82,7 @@ public final class DataBufferShort extends DataBuffer
* banks all of which are the specified size.
*
* @param size The size of the banks in the {@code DataBuffer}.
- * @param numBanks The number of banks in the a {@code DataBuffer}.
+ * @param numBanks The number of banks in the {@code DataBuffer}.
*/
public DataBufferShort(int size, int numBanks) {
super(STABLE, TYPE_SHORT,size,numBanks);
diff --git a/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java b/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java
index 30c6b0935f0..54c2cc09e19 100644
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -35,7 +35,8 @@
package java.awt.image;
-import static sun.java2d.StateTrackable.State.*;
+import static sun.java2d.StateTrackable.State.STABLE;
+import static sun.java2d.StateTrackable.State.UNTRACKABLE;
/**
* This class extends {@code DataBuffer} and stores data internally as
@@ -83,7 +84,7 @@ public final class DataBufferUShort extends DataBuffer
* banks, all of which are the specified size.
*
* @param size The size of the banks in the {@code DataBuffer}.
- * @param numBanks The number of banks in the a {@code DataBuffer}.
+ * @param numBanks The number of banks in the {@code DataBuffer}.
*/
public DataBufferUShort(int size, int numBanks) {
super(STABLE, TYPE_USHORT, size, numBanks);
diff --git a/src/java.desktop/share/classes/javax/imageio/ImageIO.java b/src/java.desktop/share/classes/javax/imageio/ImageIO.java
index 9e87640967b..e89877f25c3 100644
--- a/src/java.desktop/share/classes/javax/imageio/ImageIO.java
+++ b/src/java.desktop/share/classes/javax/imageio/ImageIO.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2022, 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
@@ -1471,7 +1471,7 @@ public final class ImageIO {
}
/**
- * Writes an image using the an arbitrary {@code ImageWriter}
+ * Writes an image using an arbitrary {@code ImageWriter}
* that supports the given format to an
* {@code ImageOutputStream}. The image is written to the
* {@code ImageOutputStream} starting at the current stream
diff --git a/src/java.desktop/share/classes/javax/swing/JFileChooser.java b/src/java.desktop/share/classes/javax/swing/JFileChooser.java
index a44edec3565..2e0866f37e7 100644
--- a/src/java.desktop/share/classes/javax/swing/JFileChooser.java
+++ b/src/java.desktop/share/classes/javax/swing/JFileChooser.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -234,7 +234,7 @@ public class JFileChooser extends JComponent implements Accessible {
public static final String ACCESSORY_CHANGED_PROPERTY = "AccessoryChangedProperty";
/**
- * Identifies whether a the AcceptAllFileFilter is used or not.
+ * Identifies whether the AcceptAllFileFilter is used or not.
*/
public static final String ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY = "acceptAllFileFilterUsedChanged";
diff --git a/src/java.desktop/share/classes/javax/swing/JLabel.java b/src/java.desktop/share/classes/javax/swing/JLabel.java
index eed6a157cc1..d6cdd1d3f75 100644
--- a/src/java.desktop/share/classes/javax/swing/JLabel.java
+++ b/src/java.desktop/share/classes/javax/swing/JLabel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -593,7 +593,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible
*
* @param key the property value to check
* @param message the IllegalArgumentException detail message
- * @return the key value if {@code key} is a a legal value for the
+ * @return the key value if {@code key} is a legal value for the
* horizontalAlignment properties
* @throws IllegalArgumentException if key isn't LEFT, CENTER, RIGHT,
* LEADING or TRAILING.
diff --git a/src/java.desktop/share/classes/javax/swing/event/DocumentEvent.java b/src/java.desktop/share/classes/javax/swing/event/DocumentEvent.java
index a197cc75880..8ce636cb3d1 100644
--- a/src/java.desktop/share/classes/javax/swing/event/DocumentEvent.java
+++ b/src/java.desktop/share/classes/javax/swing/event/DocumentEvent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -24,8 +24,8 @@
*/
package javax.swing.event;
-import javax.swing.undo.*;
-import javax.swing.text.*;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
/**
* Interface for document change notifications. This provides
@@ -82,14 +82,14 @@ public interface DocumentEvent {
* the mutation) need to have ElementChange records.
* The changes made available need not be recursive.
*
- * For example, if the an element is removed from it's
+ * For example, if an element is removed from its
* parent, this method should report that the parent
* changed and provide an ElementChange implementation
* that describes the change to the parent. If the
* child element removed had children, these elements
* do not need to be reported as removed.
*
- * If an child element is insert into a parent element,
+ * If a child element is inserted into a parent element,
* the parent element should report a change. If the
* child element also had elements inserted into it
* (grandchildren to the parent) these elements need
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
index e7febd97f09..b5b57b17828 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, 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
@@ -24,9 +24,8 @@
*/
package javax.swing.plaf.basic;
-import javax.swing.*;
-import java.awt.Component;
import java.awt.Color;
+import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
@@ -37,6 +36,11 @@ import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.InputEvent;
+import javax.swing.AbstractButton;
+import javax.swing.Icon;
+import javax.swing.JComponent;
+import javax.swing.SwingUtilities;
+
import sun.swing.SwingUtilities2;
@@ -431,7 +435,7 @@ public class BasicGraphicsUtils
* @param c the component that will display the string, may be null
* @param g the graphics context, must not be null
* @param string the string to display, may be null
- * @param underlinedIndex index of a a char value (Unicode code unit)
+ * @param underlinedIndex index of a char value (Unicode code unit)
* in the string to underline
* @param x the x coordinate to draw the text at
* @param y the y coordinate to draw the text at
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html b/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html
index 8eb1bbda9c1..9904c2aac02 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html
+++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html
@@ -4,7 +4,7 @@
Synth File Format
-