-
Notifications
You must be signed in to change notification settings - Fork 1
/
EngENQ.java
62 lines (44 loc) · 1.69 KB
/
EngENQ.java
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import java.awt.Color;
import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JLabel;
// import java.util.Random;
public class EngENQ extends JFrame {
JFrame frame;
JLabel bankLabel;
JLabel textfield=new JLabel();
// double money;
// Random rand=new Random();
Font myFont = new Font("Serrif", Font.ITALIC, 30);
public EngENQ(){
//Defining the frame
frame = new JFrame("Pawan Bank PVT LTD");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(750, 750);
frame.setLayout(null);
frame.getContentPane().setBackground(new Color(0, 0,0));
// define the Main text;
bankLabel = new JLabel("You have:");
bankLabel.setFont(myFont);
bankLabel.setForeground(new Color(192,192,192));
bankLabel.setBounds(150, 100, 400, 50);
//defining the textfield
textfield.setBackground(new Color(229, 243, 214));
textfield.setForeground(new Color(255,0,0));
textfield.setBounds(170,160,300,50);
textfield.setFont(myFont);
textfield.setEnabled(false);
textfield.setOpaque(true);
// money=rand.nextDouble(25000,50000);
// textfield.setText("Rs: "+String.valueOf(money));
DBconn dbConn=new DBconn();
double balance = dbConn.getBalance(1234,"120");
textfield.setText("Rs: "+String.valueOf(balance));
frame.add(bankLabel);
frame.add(textfield);
frame.setVisible(true);
}
// public static void main(String[] args) {
// new EngENQ();
// }
}