Java Reference
In-Depth Information
52.
53.
54.
public void
moveDown(){
55.
if
(upperLeftY < allowedMax){
56.
upperLeftY++;
57.
}
58.
}
59.
60.
public void
moveUP(){
61.
if
(upperLeftY > 0){
62.
upperLeftY--;
63.
}
64.
}
65.
66.
public void
moveRight(){
if
(upperLeftX < allowedMax){
67.
upperLeftX++;
68.
}
69.
}
public void
moveLeft(){
70.
if
(upperLeftX > 0){
71.
upperLeftX--;
72.
}
73.
74.
}
75.
76.
77.
78.
}
File:
its/ResizeJumpDisplay/ResizeJumpFrame.java
1.
package
its.ResizeJumpDisplay;
2.
3.
import
its.SimpleFrame.SimpleFrame;
4.
import
java.awt.BorderLayout;
5.
6.
public class
ResizeJumpFrame
extends
SimpleFrame{
7.
8.
public
ResizeJumpFrame(){
PositionModel posModel =
new
PositionModel(3,5);
9.
ResizeJumpPanel resizePanel =
new
ResizeJumpPanel(posModel);
10.
this
.setSize(500,300);
11.
12.
13.
this
.getContentPane().add(resizePanel,BorderLayout.CENTER);
14.
Search WWH ::
Custom Search