-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddPlace.java
More file actions
38 lines (29 loc) · 1.04 KB
/
AddPlace.java
File metadata and controls
38 lines (29 loc) · 1.04 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
30
31
32
33
34
35
36
37
38
//*****************************************************************
// OneCellInsert.java Author: Ravyar Sarbast
//
// for the places in the app when I need one input to get data from user
//*****************************************************************
package RavyarSarbastTahir;
import javax.swing.*;
import java.awt.*;
public class AddPlace extends CenteFrame {
JTextField factoryName;
TextPrompt placeholderID;
JButton adds;
public AddPlace(int x, int y, JFrame frame) throws HeadlessException {
centerScreen(x, y, frame);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
Container c = getContentPane();
JPanel main = new JPanel();
c.add(main);
main.setLayout(new GridLayout(2, 1));
factoryName = new JTextField(10);
placeholderID = new TextPrompt("Factory Name", factoryName);
adds = new JButton("Add");
main.add(factoryName);
main.add(adds);
// pack();
setMinimumSize(new Dimension(200, 100));
}
}