Java 教程是为 JDK 8 编写的。本页中描述的示例和实践未利用在后续版本中引入的改进。
javax.swing.JComponent.setFont
to change the font of a component.javax.swing.text.JTextComponent.setText
to change the text of a component.SwingWorker
has two type parameters. Explain how these type parameters are used, and why it often doesn't matter what they are.Flipper
example so that it pauses 5 seconds between "coin flips." If the user clicks the "Cancel", the coin-flipping loop terminates immediately.