-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPopUp.java
More file actions
37 lines (28 loc) · 756 Bytes
/
PopUp.java
File metadata and controls
37 lines (28 loc) · 756 Bytes
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
package bootathonfinal;
import java.awt.Color;
import javax.swing.*;
public class PopUp {
PopUp(JFrame frame)
{
JPanel panel = new JPanel();
JTextField tf1 = new JTextField(20);
tf1.setBounds(250, 200, 200,30);
panel.setBounds(200, 150, 300, 150);
panel.setBackground(Color.white);
JButton btn = new JButton("Ok",new ImageIcon("tic.png"));
btn.setMnemonic('O');
btn.setBounds(250, 250, 80, 30);
frame.add(btn);
JButton btn1 = new JButton("Cancel");
btn1.setBounds(350, 250, 80, 30);
btn1.setBackground(Color.RED);
btn1.setForeground(Color.WHITE);
frame.add(tf1);
frame.add(btn1);
frame.add(panel);
//frame.setResizable(false);
}
public static void main(String []args)
{
}
}