DashBoard



import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;
import javax.swing.JLabel;
import javax.swing.JSpinner;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.SwingConstants;
import java.awt.Toolkit;

public class MainInter extends JFrame {

private JPanel contentPane;


public MainInter() {
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\HU_logo_jpeg_400x400.png"));
setTitle("Welcome to HU portal");
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 636, 585);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JButton btnExamDepart = new JButton("Examination");
btnExamDepart.setBackground(Color.WHITE);
btnExamDepart.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\midterm-clipart-exam-clipart.jpg"));
btnExamDepart.addActionListener(new ActionListener() {
// this action is perform after pressing button
public void actionPerformed(ActionEvent e) {
Exam ex = new Exam ();
ex.setVisible(true);
dispose();
}
});
btnExamDepart.setBounds(367, 189, 193, 54);
contentPane.add(btnExamDepart);
JButton btnAcc = new JButton("Accounts");
btnAcc.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AccountStd Ac = new AccountStd();
Ac.setVisible(true);
dispose();
}
});
btnAcc.setBackground(Color.WHITE);
btnAcc.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\1313015812_Vector_Clipart.png"));
btnAcc.setBounds(367, 274, 193, 54);
contentPane.add(btnAcc);
JButton btnRegis = new JButton("Registration");
btnRegis.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Registration r= new Registration();
r.setVisible(true);
dispose();
}
});
btnRegis.setBackground(Color.WHITE);
btnRegis.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\cash-register-clip-art-free-895795.png"));
btnRegis.setBounds(367, 362, 193, 54);
contentPane.add(btnRegis);
JPanel panel = new JPanel();
panel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
panel.setBounds(10, 11, 610, 512);
contentPane.add(panel);
panel.setLayout(null);
JButton btnNewButton = new JButton("SignOut");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Welcome w = new Welcome();
w.setVisible(true);
dispose();
}
});
btnNewButton.setBackground(new Color(245, 245, 220));
btnNewButton.setBounds(10, 11, 80, 14);
panel.add(btnNewButton);
JLabel lblNewLabel_1 = new JLabel("The Hajvery University");
lblNewLabel_1.setForeground(Color.RED);
lblNewLabel_1.setFont(new Font("Urdu Typesetting", Font.ITALIC, 27));
lblNewLabel_1.setBounds(162, 71, 269, 55);
panel.add(lblNewLabel_1);
JLabel lblNewLabel_2 = new JLabel("Lahore, Pakistan");
lblNewLabel_2.setFont(new Font("Sitka Display", Font.PLAIN, 23));
lblNewLabel_2.setBounds(213, 131, 155, 20);
panel.add(lblNewLabel_2);
JPanel panel_1 = new JPanel();
panel_1.setBorder(UIManager.getBorder("InternalFrame.border"));
panel_1.setBounds(43, 61, 524, 108);
panel.add(panel_1);
panel_1.setBackground(Color.WHITE);
JLabel lblNewLabel_3 = new JLabel("");
lblNewLabel_3.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel_3.setBackground(Color.DARK_GRAY);
lblNewLabel_3.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\12107964_10153161750172688_8872249596591658378_n.jpg"));
lblNewLabel_3.setBounds(96, 192, 129, 128);
panel.add(lblNewLabel_3);
JLabel lblSmartPortal = new JLabel("Smart Portal");
lblSmartPortal.setHorizontalAlignment(SwingConstants.CENTER);
lblSmartPortal.setForeground(Color.BLUE);
lblSmartPortal.setFont(new Font("Urdu Typesetting", Font.ITALIC, 27));
lblSmartPortal.setBounds(64, 309, 192, 46);
panel.add(lblSmartPortal);
JLabel lblAccessIsEasy = new JLabel("Access is easy now");
lblAccessIsEasy.setHorizontalAlignment(SwingConstants.CENTER);
lblAccessIsEasy.setForeground(new Color(0, 0, 0));
lblAccessIsEasy.setFont(new Font("Urdu Typesetting", Font.ITALIC, 27));
lblAccessIsEasy.setBounds(30, 348, 269, 46);
panel.add(lblAccessIsEasy);
JButton btnExit = new JButton("Exit");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// dispose(); is the built-in method for remove the current jframe from the memory
dispose();
}
});
btnExit.setForeground(new Color(0, 0, 0));
btnExit.setBackground(new Color(250, 240, 230));
btnExit.setBounds(444, 487, 105, 14);
panel.add(btnExit);
JButton btnFeedback = new JButton("Feedback");
btnFeedback.setForeground(new Color(0, 0, 0));
btnFeedback.setBackground(new Color(250, 240, 230));
btnFeedback.setBounds(64, 487, 102, 14);
panel.add(btnFeedback);
JButton btnContactUs = new JButton("Setting");
btnContactUs.setForeground(new Color(0, 0, 0));
btnContactUs.setBackground(new Color(250, 240, 230));
btnContactUs.setBounds(176, 487, 80, 14);
panel.add(btnContactUs);
JButton btnAccInfo = new JButton("Acc info");
btnAccInfo.setForeground(new Color(0, 0, 0));
btnAccInfo.setBackground(new Color(250, 240, 230));
btnAccInfo.setBounds(264, 487, 80, 14);
panel.add(btnAccInfo);
JButton btnHelp = new JButton("Help");
btnHelp.setForeground(new Color(0, 0, 0));
btnHelp.setBackground(new Color(250, 240, 230));
btnHelp.setBounds(354, 487, 80, 14);
panel.add(btnHelp);
JLabel lblNewLabel = new JLabel("All rights are reserved. It is product released by Let's Programming.");
lblNewLabel.setBounds(20, 534, 289, 14);
contentPane.add(lblNewLabel);
}
}

Comments

Popular posts from this blog

Operating System | Best Definition of Opetating System

Umbrella activities in Software Engineering