Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9f8d82e

Browse files
committedAug 20, 2017
Chapter 02 section 03 updated.
1 parent b72001e commit 9f8d82e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed
 

‎02-Java-Swing-Basics/03-Rendering-Basics/src/AlgoFrame.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public AlgoFrame(String title, int canvasWidth, int canvasHeight){
1515

1616
//setSize(canvasWidth, canvasHeight);
1717
AlgoCanvas canvas = new AlgoCanvas();
18-
//canvas.setPreferredSize(new Dimension(canvasWidth,canvasHeight));
18+
// canvas.setPreferredSize(new Dimension(canvasWidth,canvasHeight));
1919
setContentPane(canvas);
2020
pack();
2121

@@ -24,7 +24,7 @@ public AlgoFrame(String title, int canvasWidth, int canvasHeight){
2424

2525
setVisible(true);
2626

27-
System.out.println(getContentPane().getBounds());
27+
// System.out.println(getContentPane().getBounds());
2828
}
2929

3030
public AlgoFrame(String title){
@@ -43,7 +43,6 @@ public void paintComponent(Graphics g) {
4343
super.paintComponent(g);
4444

4545
g.drawOval(50, 50, 300, 300);
46-
//g.drawOval(0, 0, 800, 800);
4746
}
4847

4948
@Override

‎02-Java-Swing-Basics/03-Rendering-Basics/src/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class Main {
66
public static void main(String[] args) {
77

88
EventQueue.invokeLater(() -> {
9-
AlgoFrame frame = new AlgoFrame("Welcome",800,800);
9+
AlgoFrame frame = new AlgoFrame("Welcome",500,500);
1010
});
1111
}
1212
}

‎02-Java-Swing-Basics/Chapter-02.key

56.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.