forked from Vaibhav911/brivago
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseTemplate.java
More file actions
43 lines (38 loc) · 1.31 KB
/
BaseTemplate.java
File metadata and controls
43 lines (38 loc) · 1.31 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
39
40
41
42
43
import javax.swing.*;
import javax.imageio.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
class BaseTemplate
{
public static void main(String args[]) throws IOException
{
BaseTemplate basetemplate = new BaseTemplate();
basetemplate.gui();
}
public void gui() throws IOException
{
JFrame frame = new JFrame("Brivago");//setting background image
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setSize(1920,1080);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.setContentPane(new JLabel(new ImageIcon("beach.jpg")));
frame.setLayout(null);
ImageIcon brivagoicon = new ImageIcon("brivagoicon.jpg");//settin app icon
frame.setIconImage(brivagoicon.getImage());
JButton profile = new JButton("profile");//profile button setup
profile.setBounds(1405,10,77,30);
frame.getContentPane().add(profile);
JButton logout = new JButton();//logout button setup
logout.setBounds(1495, 10, 30,30);
frame.getContentPane().add(logout);
ImageIcon image = new ImageIcon("power.jpg");
logout.setIcon(image);
JButton mybook = new JButton("My Bookings");//mybooking button setup
mybook.setBounds(1285,10, 108, 30);
frame.getContentPane().add(mybook);
frame.revalidate();
frame.repaint();
}
}