private void generateButtons(){
circle.setBounds(buttonWidth, screenHeight, buttonHeight, buttonHeight);
circle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
setInputImage("/Users/kyla/Desktop/circle_jpg.jpg");
}
});
square.setBounds(buttonWidth*2, screenHeight, buttonWidth, buttonHeight);
square.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
setInputImage("/Users/kyla/Desktop/anothercircle.jpg");
}
});
triangle.setBounds(buttonWidth*3, screenHeight, buttonWidth, buttonHeight);
triangle.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
setInputImage("/Users/kyla/Desktop/shapes.jpg");
}
});
add(circle);
add(square);
add(triangle);
No comments:
Post a Comment