-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuttonPanel.java
More file actions
executable file
·29 lines (27 loc) · 1.42 KB
/
buttonPanel.java
File metadata and controls
executable file
·29 lines (27 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/************************************************************************************
* Wayne Alexander Mack Jr. *
* email: wamj283@gmail.com *
* phone: (443) 627 - 1117 *
* -------------------------------------------------------------------------------- *
* CMSC 335 - Project 3 *
* Written in : JAVA *
* (c) 2020 Wayne Alexander Mack Jr. *
* -------------------------------------------------------------------------------- *
* buttonPanel.java - for Panel object used in display *
************************************************************************************/
package Project3;
import javax.swing.*;
public class buttonPanel extends JPanel {
JButton button;
buttonPanel (String buttonLabel, int rowNumber) {
setLayout(null);
setBounds(0,((rowNumber - 1) * 50),400,50);
button = new JButton();
button.setBounds (150,10,100,30);
button.setText(buttonLabel);
add(button);
}
public void changeText (String newText) {
button.setText(newText);
}
}