-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathPaytm.java
54 lines (43 loc) · 1.47 KB
/
Paytm.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
package travel_and_Tourism_Organisation_System;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Paytm extends JFrame implements ActionListener{
Paytm(){
JEditorPane j = new JEditorPane();
j.setEditable(false);
try {
j.setPage("https://paytm.com/rent-payment");
}catch (Exception e) {
j.setContentType("text/html");
j.setText("<html>Could not load</html>");
}
JScrollPane scrollPane = new JScrollPane(j);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().add(scrollPane);
setPreferredSize(new Dimension(800,600));
JButton back=new JButton("Back");
back.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
});
back.setBounds(610, 20, 80, 40);
j.add(back);
setSize(800,600);
setLocation(340,80);
setVisible(true);
}
public void actionPerformed(ActionEvent ae) {
setVisible(false);
new Payment();
}
public static void main(String[] args){
new Paytm().setVisible(true);
}
}