Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.FlowLayout;
- import java.awt.Font;
- import java.awt.Label;
- import java.awt.event.ActionListener;
- import java.awt.event.ItemEvent;
- import java.awt.event.ItemListener;
- import java.nio.charset.MalformedInputException;
- import java.nio.file.SecureDirectoryStream;
- import java.awt.event.ActionEvent;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JList;
- import javax.swing.JTextField;
- import javax.swing.ListSelectionModel;
- import javax.swing.event.ListSelectionEvent;
- import javax.swing.event.ListSelectionListener;
- import javax.xml.crypto.dsig.SignedInfo;
- import javax.swing.JPasswordField;
- import javax.swing.JScrollPane;
- import javax.swing.JOptionPane;
- import javax.swing.JPanel;
- public class Interface extends JFrame {
- private JFrame mainframe;
- private JPanel controlPanel;
- private JButton studentButton;
- private JButton adminButton;
- private JButton teacherButton;
- private JButton signIn;
- private JButton button1;
- private JButton button3;
- private JButton button2;
- private JButton back;
- private JButton mainMenu;
- private JPasswordField studentPass;
- private JPasswordField teacherPass;
- private JPasswordField adminPass;
- private JTextField usertext1;
- private JTextField usertext2;
- private JTextField usertext3;
- private JTextField text1;
- private JTextField text2;
- private JTextField text3;
- private JTextField text4;
- private JTextField text5;
- private JLabel userLabel;
- private JLabel passLabel;
- private JLabel label1;
- private JLabel label2;
- private JLabel label3;
- private JLabel label4;
- private JLabel label5;
- private JLabel label6;
- private JLabel label7;
- private JLabel label8;
- private JLabel backgroundLabel;
- private JComboBox<String> departmentList;
- private static final String[] department = {"CSE", "MCE", "EEE", "CEE", "TVE"};
- private JComboBox<String> semesterList;
- private static final String[] semester = {"1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th"};
- private JComboBox<String> categoryList;
- private JComboBox<String> courseList;
- private static final String[] cseCourses = {"--","CSE4401", "CSE 4405", "Math 4407", "EEE 4435", "CSE 4407", "CSE 4403"};
- private static final String[] eeeCourses = {"EEE4401", "EEE 4405", "Math 4107", "EEE 4435", "CSE 4407", "CSE 4403"};
- private static final String[] mceCourses = {"MCE4401", "MCE 4405", "Math 4107", "EEE 4435", "MCE 4407", "MCE 4403"};
- private static final String[] category = {"Educational", "Literary"};
- void createMainframe(){
- mainframe= new JFrame("IUT E-LIBRARY");
- mainframe.setSize(900,700);
- studentButton = new JButton("Log-In as Student");
- teacherButton = new JButton("Log-In as Teacher");
- adminButton = new JButton("Log-In as Admin");
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\main.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- label8 = new JLabel("WELCOME TO IUT E-LIBRARY!");
- label8.setFont(new Font("Forte", Font.BOLD, 34));
- label8.setForeground(Color.white);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- backgroundLabel.add(label8);
- backgroundLabel.add(studentButton);
- backgroundLabel.add(teacherButton);
- backgroundLabel.add(adminButton);
- //backgroundLabel.add(label8);
- studentButton.setBounds(280,220,180,40);
- adminButton.setBounds(280,290,180,40);
- teacherButton.setBounds(280,360,180,40);
- label8.setBounds(170, -220, 600, 600);
- //label8.setSize(500,600);
- mainframe.setVisible(true);
- studentButton.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createStudentPanel();
- }
- }
- );
- teacherButton.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createTeacherPanel();
- }
- }
- );
- adminButton.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createAdminPanel();
- }
- }
- );
- }
- void createStudentPanel(){
- mainframe.dispose();
- mainframe= new JFrame("Student LogIn");
- mainframe.setSize(900,700);
- studentPass = new JPasswordField(8);
- studentPass.setEchoChar('*');
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\main.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- usertext1 = new JTextField(20);
- userLabel= new JLabel("Enter Username:",JLabel.LEFT);
- passLabel= new JLabel("Enter Password:",JLabel.LEFT);
- userLabel.setForeground(Color.white);
- passLabel.setForeground(Color.white);
- backgroundLabel.add(userLabel);
- backgroundLabel.add(passLabel);
- backgroundLabel.add(usertext1);
- backgroundLabel.add(studentPass);
- userLabel.setBounds(90,135,250,40);
- passLabel.setBounds(90,175,250,40);
- usertext1.setBounds(250,150,200,20);
- studentPass.setBounds(250,190,200,20);
- signIn = new JButton("Sign-In");
- back = new JButton("Go Back");
- backgroundLabel.add(signIn);
- backgroundLabel.add(back);
- signIn.setBounds(220,300,250,40);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- signIn.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- studentVerified();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- void createTeacherPanel(){
- mainframe.dispose();
- mainframe= new JFrame("Teacher LogIn");
- mainframe.setSize(900,700);
- studentPass = new JPasswordField(8);
- studentPass.setEchoChar('*');
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\libraries3.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- usertext1 = new JTextField(20);
- userLabel= new JLabel("Enter Username:",JLabel.LEFT);
- passLabel= new JLabel("Enter Password:",JLabel.LEFT);
- userLabel.setForeground(Color.white);
- passLabel.setForeground(Color.white);
- backgroundLabel.add(userLabel);
- backgroundLabel.add(passLabel);
- backgroundLabel.add(usertext1);
- backgroundLabel.add(studentPass);
- userLabel.setBounds(90,135,250,40);
- passLabel.setBounds(90,175,250,40);
- usertext1.setBounds(250,150,200,20);
- studentPass.setBounds(250,190,200,20);
- signIn = new JButton("Sign-In");
- back = new JButton("Go Back");
- backgroundLabel.add(signIn);
- backgroundLabel.add(back);
- signIn.setBounds(220,300,250,40);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- signIn.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- teacherVerified();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- void createAdminPanel(){
- mainframe.dispose();
- mainframe= new JFrame("Admin LogIn");
- mainframe.setSize(900,700);
- studentPass = new JPasswordField(8);
- studentPass.setEchoChar('*');
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\Books.png");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- usertext1 = new JTextField(20);
- userLabel= new JLabel("Enter Username:",JLabel.LEFT);
- passLabel= new JLabel("Enter Password:",JLabel.LEFT);
- userLabel.setForeground(Color.white);
- passLabel.setForeground(Color.white);
- backgroundLabel.add(userLabel);
- backgroundLabel.add(passLabel);
- backgroundLabel.add(usertext1);
- backgroundLabel.add(studentPass);
- userLabel.setBounds(160,75,250,40);
- passLabel.setBounds(160,115,250,40);
- usertext1.setBounds(320,90,200,20);
- studentPass.setBounds(320,130,200,20);
- signIn = new JButton("Sign-In");
- back = new JButton("Go Back");
- backgroundLabel.add(signIn);
- backgroundLabel.add(back);
- signIn.setBounds(220,300,250,40);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- signIn.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- adminVerified();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- void studentVerified(){
- mainframe.dispose();
- mainframe= new JFrame("Browse");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\main.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- button1 = new JButton("Browse Books");
- button3 = new JButton("Browse Videos");
- back = new JButton("Go Back");
- label8 = new JLabel("What do you want to do?");
- label8.setFont(new Font("Lucida Handwriting", Font.BOLD, 34));
- label8.setForeground(Color.white);
- backgroundLabel.add(button1);
- backgroundLabel.add(button3);
- backgroundLabel.add(label8);
- backgroundLabel.add(back);
- button1.setBounds(290,240,170,40);
- button3.setBounds(290,310,170,40);
- label8.setBounds(170, -220, 600, 600);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- button1.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- bookVerified();
- }
- }
- );
- button3.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- bookVerified();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createStudentPanel();
- }
- }
- );
- }
- void bookVerified(){
- mainframe.dispose();
- mainframe= new JFrame("Choose Category");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\main.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- userLabel= new JLabel("Select Department:",JLabel.LEFT);
- passLabel= new JLabel("Select Semester:",JLabel.LEFT);
- userLabel.setForeground(Color.white);
- passLabel.setForeground(Color.white);
- departmentList = new JComboBox<>(department);
- departmentList.setMaximumRowCount(5);
- semesterList = new JComboBox<>(semester);
- semesterList.setMaximumRowCount(8);
- button1 = new JButton("Browse");
- back = new JButton("Go Back");
- backgroundLabel.add(userLabel);
- backgroundLabel.add(passLabel);
- backgroundLabel.add(departmentList);
- backgroundLabel.add(semesterList);
- backgroundLabel.add(button1);
- backgroundLabel.add(back);
- label1= new JLabel("Select Course:",JLabel.LEFT);
- label1.setForeground(Color.white);
- courseList = new JComboBox<>(cseCourses);
- courseList.setMaximumRowCount(6);
- backgroundLabel.add(courseList);
- backgroundLabel.add(label1);
- label1.setBounds(140,240,250,40);
- courseList.setBounds(300,250, 200, 20);
- userLabel.setBounds(140,160,250,40);
- passLabel.setBounds(140,200,250,40);
- departmentList.setBounds(300,170,200,20);
- semesterList.setBounds(300,210,200,20);
- button1.setBounds(220,350,250,40);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- button1.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- bookList();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- studentVerified();
- }
- }
- );
- }
- void teacherVerified(){
- mainframe.dispose();
- mainframe= new JFrame("Teacher Options");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\libraries3.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- button1 = new JButton("Upload Videos");
- button2 = new JButton("Browse Books");
- button3 = new JButton("Upload Lecture Materials");
- back = new JButton("Go Back");
- label8 = new JLabel("What do you want to do?");
- label8.setFont(new Font("Lucida Handwriting", Font.BOLD, 34));
- label8.setForeground(Color.white);
- backgroundLabel.add(button1);
- backgroundLabel.add(button3);
- backgroundLabel.add(button2);
- backgroundLabel.add(label8);
- backgroundLabel.add(back);
- button1.setBounds(220,150,250,40);
- button3.setBounds(220,220,250,40);
- button2.setBounds(220,290,250,40);
- label8.setBounds(170, -220, 600, 600);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- button1.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- teacherUpload();
- }
- }
- );
- button3.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- teacherUpload();
- }
- }
- );
- button2.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- bookVerified();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createTeacherPanel();
- }
- }
- );
- }
- void adminVerified(){
- mainframe.dispose();
- mainframe= new JFrame("Admin Options");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\Books.png");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- button1 = new JButton("Add New Book");
- button2 = new JButton("Update Versions");
- back = new JButton("Go Back");
- label8 = new JLabel("What do you want to do?");
- label8.setFont(new Font("Lucida Handwriting", Font.BOLD, 34));
- label8.setForeground(Color.white);
- backgroundLabel.add(button1);
- backgroundLabel.add(button2);
- backgroundLabel.add(label8);
- backgroundLabel.add(back);
- button1.setBounds(270,200,250,40);
- button2.setBounds(270,270,250,40);
- label8.setBounds(170, -220, 600, 600);
- back.setBounds(700, 60, 100, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- button1.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- addBook();
- }
- }
- );
- button2.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- updateVersion();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createAdminPanel();
- }
- }
- );
- }
- void teacherUpload(){
- mainframe.dispose();
- mainframe= new JFrame("Teacher Category");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\libraries3.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- userLabel= new JLabel("Select Department:",JLabel.LEFT);
- passLabel= new JLabel("Select Semester:",JLabel.LEFT);
- label2= new JLabel("Title:",JLabel.LEFT);
- userLabel.setForeground(Color.white);
- passLabel.setForeground(Color.white);
- label2.setForeground(Color.white);
- usertext1 = new JTextField();
- departmentList = new JComboBox<>(department);
- departmentList.setMaximumRowCount(5);
- semesterList = new JComboBox<>(semester);
- semesterList.setMaximumRowCount(8);
- button1 = new JButton("Upload");
- back = new JButton("Go Back");
- mainMenu = new JButton("Back to Main");
- backgroundLabel.add(userLabel);
- backgroundLabel.add(passLabel);
- backgroundLabel.add(departmentList);
- backgroundLabel.add(semesterList);
- backgroundLabel.add(button1);
- backgroundLabel.add(usertext1);
- backgroundLabel.add(label2);
- backgroundLabel.add(back);
- backgroundLabel.add(mainMenu);
- label1= new JLabel("Select Course:",JLabel.LEFT);
- label1.setForeground(Color.white);
- courseList = new JComboBox<>(cseCourses);
- courseList.setMaximumRowCount(6);
- backgroundLabel.add(courseList);
- backgroundLabel.add(label1);
- label1.setBounds(60,120,250,40);
- courseList.setBounds(220,130, 200, 20);
- label2.setBounds(60, 160, 250, 40);
- usertext1.setBounds(220, 170, 200, 20);
- userLabel.setBounds(60,40,250,40);
- passLabel.setBounds(60,80,250,40);
- departmentList.setBounds(220,50,200,20);
- semesterList.setBounds(220,90,200,20);
- button1.setBounds(180,230,250,40);
- back.setBounds(700, 60, 100, 20);
- mainMenu.setBounds(700, 30, 130, 20);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- button1.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- teacherUpload();
- }
- }
- );
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- teacherVerified();
- }
- }
- );
- mainMenu.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- void addBook(){
- mainframe.dispose();
- mainframe= new JFrame("Add Book");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\Books.png");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- label1 = new JLabel("Book Name: ",JLabel.LEFT);
- label2 = new JLabel("Book ID: ",JLabel.LEFT);
- label3 = new JLabel("Author: ",JLabel.LEFT);
- label4 = new JLabel("Publication: ",JLabel.LEFT);
- label5 = new JLabel("Transaction ID: ",JLabel.LEFT);
- label6 = new JLabel("Category: ",JLabel.LEFT);
- label7 = new JLabel("Department: ",JLabel.LEFT);
- label1.setForeground(Color.white);
- label2.setForeground(Color.white);
- label3.setForeground(Color.white);
- label4.setForeground(Color.white);
- label5.setForeground(Color.white);
- label6.setForeground(Color.white);
- label7.setForeground(Color.white);
- text1 = new JTextField(20);
- text2 = new JTextField(20);
- text3 = new JTextField(20);
- text4 = new JTextField(20);
- text5 = new JTextField(20);
- button1 = new JButton("ADD");
- back = new JButton("Go Back");
- mainMenu = new JButton("Back to Main");
- label1.setBounds(200,90,250,40);
- label2.setBounds(200,130,250,40);
- label3.setBounds(200,170,250,40);
- label4.setBounds(200,210,250,40);
- label5.setBounds(200,250,250,40);
- label6.setBounds(200,290,250,40);
- label7.setBounds(200,330,250,40);
- text1.setBounds(360,100,200,20);
- text2.setBounds(360,140,200,20);
- text3.setBounds(360,180,200,20);
- text4.setBounds(360,220,200,20);
- text5.setBounds(360,260,200,20);
- button1.setBounds(190,400,320,40);
- back.setBounds(700, 60, 100, 20);
- mainMenu.setBounds(700, 30, 130, 20);
- departmentList = new JComboBox<>(department);
- departmentList.setMaximumRowCount(5);
- categoryList = new JComboBox<>(category);
- categoryList.setMaximumRowCount(5);
- categoryList.setBounds(360, 300, 200, 20);
- departmentList.setBounds(360, 340, 200, 20);
- backgroundLabel.add(label1);
- backgroundLabel.add(label2);
- backgroundLabel.add(label3);
- backgroundLabel.add(label4);
- backgroundLabel.add(label5);
- backgroundLabel.add(label6);
- backgroundLabel.add(label7);
- backgroundLabel.add(text1);
- backgroundLabel.add(text2);
- backgroundLabel.add(text3);
- backgroundLabel.add(text4);
- backgroundLabel.add(text5);
- backgroundLabel.add(departmentList);
- backgroundLabel.add(categoryList);
- backgroundLabel.add(button1);
- backgroundLabel.add(back);
- backgroundLabel.add(mainMenu);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- adminVerified();
- }
- }
- );
- mainMenu.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- void updateVersion(){
- }
- void bookList(){
- mainframe.dispose();
- mainframe= new JFrame("Book List");
- mainframe.setSize(900,700);
- backgroundLabel = new JLabel();
- ImageIcon icon = new ImageIcon("C:\\Users\\shiha\\Desktop\\booklist.jpg");
- backgroundLabel.setIcon(icon);
- backgroundLabel.setSize(500,600);
- label1 = new JLabel("->Java How To Program.pdf",JLabel.CENTER);
- label2 = new JLabel("->Algorithms by Corman.pdf",JLabel.CENTER);
- label3 = new JLabel("->JAVA code by dietel.pdf",JLabel.CENTER);
- label4 = new JLabel("->Systems Analysis and Design.pdf",JLabel.CENTER);
- label5 = new JLabel("->Digital Signal Processing by Mubin.pdf",JLabel.CENTER);
- label6 = new JLabel("->Telecommunications by Abir.pdf",JLabel.CENTER);
- label7 = new JLabel("->Statistical and Probabilitical Analysis.pdf",JLabel.CENTER);
- back = new JButton("Go Back");
- mainMenu = new JButton("Back to Main");
- label1.setForeground(Color.blue);
- label2.setForeground(Color.blue);
- label3.setForeground(Color.blue);
- label4.setForeground(Color.blue);
- label5.setForeground(Color.blue);
- label6.setForeground(Color.blue);
- label7.setForeground(Color.blue);
- label1.setBounds(100,70,250,40);
- label2.setBounds(100,110,250,40);
- label3.setBounds(100,150,250,40);
- label4.setBounds(100,190,250,40);
- label5.setBounds(100,230,250,40);
- label6.setBounds(100,270,250,40);
- label7.setBounds(100,310,250,40);
- back.setBounds(700, 60, 100, 20);
- mainMenu.setBounds(700, 30, 130, 20);
- backgroundLabel.add(label1);
- backgroundLabel.add(label2);
- backgroundLabel.add(label3);
- backgroundLabel.add(label4);
- backgroundLabel.add(label5);
- backgroundLabel.add(label6);
- backgroundLabel.add(label7);
- backgroundLabel.add(back);
- backgroundLabel.add(mainMenu);
- mainframe.add(backgroundLabel);
- mainframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
- mainframe.setVisible(true);
- back.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- bookVerified();
- }
- }
- );
- mainMenu.addActionListener(new ActionListener(){
- public void actionPerformed(ActionEvent e){
- createMainframe();
- }
- }
- );
- }
- public Interface(){
- createMainframe();
- }
- public static void main(String[] args){
- Interface a = new Interface();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement