Skip to content

Commit 14e5492

Browse files
committed
fix Swing-based stuff too
1 parent 2b3166f commit 14e5492

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lectures/gui_swing/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>Graphical User Interfaces: Display and Layout</h1>
66
</p>
77
<p>
88
In fact, the standard WIMP model of graphical user interfaces (Windows, Icons,
9-
Menus, Pointer) was developed at Xerox PARC during the 1970's in and along with
9+
Menus, Pointer) was developed at Xerox PARC during the 1970's along with
1010
one of the first object-oriented programming languages, Smalltalk. GUIs
1111
influenced the language design and vice versa. The WIMP model first saw
1212
widespread deployment by Apple with the first Macintosh computer and was
@@ -110,7 +110,7 @@ <h2>Building a GUI</h2>
110110
<pre>
111111
JComponent parent = ...;
112112
JComponent child = ...;
113-
p.add(child);
113+
parent.add(child);
114114
</pre>
115115
<p>
116116
The method <code>getComponents()</code> returns an array of the child components
@@ -119,7 +119,7 @@ <h2>Building a GUI</h2>
119119
<h2>GUI Designers</h2>
120120
<p>
121121
Support for GUI design is built into various IDEs, such as NetBeans or IntelliJ
122-
IDEA. For example, IntelliJ has a GUI Designer for this purposes. These design
122+
IDEA. For example, IntelliJ has a GUI Designer for this purpose. These design
123123
applications give you a user interface to design GUIs and save them into an
124124
external file in XML format that can be read in later by an application to set
125125
up its component tree and to connect it to application code.
@@ -183,7 +183,7 @@ <h2>Threads</h2>
183183
<p>
184184
Unlike simple Java programs, a Swing application typically has multiple
185185
concurrent threads: a <strong>main thread</strong>, an <strong>event dispatch
186-
thread</strong>, and optionally more threads that do computation n the
186+
thread</strong>, and optionally more threads that do computation in the
187187
background. The job of the event dispatch thread is to loop continuously,
188188
listening for the occurrence of hardware-generated events such as mouse clicks.
189189
For each such occurrence, it constructs an event object describing the event

lectures/guievents_swing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ <h3>Using background threads with Swing</h3>
100100
called by the task thread.
101101
</p>
102102
<p>
103-
To report progress back to other threads;
103+
To report progress back to other threads,
104104
the worker thread may call <code>setProgress()</code>; they can observe the
105105
progress report by calling <code>getProgress()</code>.
106106
When the task completes by returning

0 commit comments

Comments
 (0)