Notes by
Ben Borgers
F’22
setDefaultCloseOperation(EXIT_ON_CLOSE)
(method on JFrame
)This somehow runs code as thread safe (avoid race conditions?):
public static void main(String [] args) {
public void run() {
new Main();
}
}
MyRun myRun = new MyRun();
java.awt.EventQueue.invokeLater(myRun);
or:
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Main();
}
});
BorderLayout
: like Finder, where there’s 1-4 fixed-width border areas and a variable-width content area.
add(new Border(), BorderLayout.WEST)
JPanel
as much as you’d like (like <div>
)public final int = 3;
public static int = 3;
Rect.printCount()
).s1.equals(s2)
.