diff --git a/Add_new_books.java b/Add_new_books.java new file mode 100644 index 0000000..bccc6bd --- /dev/null +++ b/Add_new_books.java @@ -0,0 +1,226 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import javax.swing.JRadioButton; +import javax.swing.JComboBox; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +public class Add_new_books extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Add_new_books frame = new Add_new_books(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Add_new_books() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 319, 1014, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("Book's name :- "); + lblNewLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + lblNewLabel.setBounds(59, 25, 145, 32); + contentPane.add(lblNewLabel); + + JLabel label = new JLabel("Writer's name :- "); + label.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label.setBounds(59, 101, 145, 32); + contentPane.add(label); + + JLabel label_1 = new JLabel("Condition :- "); + label_1.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_1.setBounds(59, 184, 145, 32); + contentPane.add(label_1); + + JTextArea bkname = new JTextArea(); + bkname.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + bkname.setBounds(235, 26, 166, 37); + contentPane.add(bkname); + + JTextArea wrtrname = new JTextArea(); + wrtrname.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + wrtrname.setBounds(235, 102, 166, 37); + contentPane.add(wrtrname); + + JRadioButton rdbtnNewRadioButton = new JRadioButton(" Old"); + rdbtnNewRadioButton.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + rdbtnNewRadioButton.setSelected(false); + rdbtnNewRadioButton.setEnabled(false); + rdbtnNewRadioButton.setBounds(235, 172, 75, 32); + contentPane.add(rdbtnNewRadioButton); + + JRadioButton rdbtnNewRadioButton_1 = new JRadioButton(" New"); + rdbtnNewRadioButton_1.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + rdbtnNewRadioButton_1.setSelected(true); + rdbtnNewRadioButton_1.setEnabled(false); + rdbtnNewRadioButton_1.setBounds(235, 213, 81, 26); + contentPane.add(rdbtnNewRadioButton_1); + + JLabel label_2 = new JLabel(" Published Date :- "); + label_2.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_2.setBounds(481, 25, 158, 32); + contentPane.add(label_2); + + JComboBox date = new JComboBox(); + for(int i=1;i<=31;i++) + { + String str=String.valueOf(i); + date.addItem(str); + } + date.setBounds(662, 32, 48, 27); + contentPane.add(date); + + JComboBox month = new JComboBox(); + month.setBounds(739, 32, 75, 27); + month.addItem("Jan"); + month.addItem("Feb"); + month.addItem("Mar"); + month.addItem("Apr"); + month.addItem("May"); + month.addItem("Jun"); + month.addItem("Jul"); + month.addItem("Aug"); + month.addItem("Sep"); + month.addItem("Oct"); + month.addItem("Nov"); + month.addItem("Dec"); + contentPane.add(month); + + JComboBox year = new JComboBox(); + for(int i=1901;i<=2018;i++) + { + String str=String.valueOf(i); + year.addItem(str); + } + year.setBounds(841, 32, 109, 27); + contentPane.add(year); + + JLabel label_3 = new JLabel(" Subject's name :- "); + label_3.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_3.setBounds(481, 184, 158, 32); + contentPane.add(label_3); + + JComboBox sub = new JComboBox(); + sub.setBounds(662, 188, 166, 32); + sub.addItem("English"); + sub.addItem("Hindi"); + sub.addItem("Bengali"); + sub.addItem("Maths"); + sub.addItem("Physics"); + sub.addItem("Chemistry"); + sub.addItem("Biology"); + sub.addItem("Computer"); + sub.addItem("History"); + sub.addItem("Geography"); + sub.addItem("Others"); + contentPane.add(sub); + + JLabel label_4 = new JLabel(" Price (INR) :- "); + label_4.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_4.setBounds(481, 261, 145, 32); + contentPane.add(label_4); + + JTextArea publs = new JTextArea(); + publs.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + publs.setBounds(662, 102, 166, 37); + contentPane.add(publs); + + JLabel label_5 = new JLabel(" Publisher name :- "); + label_5.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_5.setBounds(481, 101, 169, 32); + contentPane.add(label_5); + + JTextArea price = new JTextArea(); + price.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + price.setBounds(662, 262, 166, 37); + contentPane.add(price); + + JLabel label_6 = new JLabel("Source :- "); + label_6.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_6.setBounds(59, 261, 145, 32); + contentPane.add(label_6); + + JTextArea src = new JTextArea(); + src.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + src.setBounds(235, 262, 166, 37); + contentPane.add(src); + + JButton btnNewButton = new JButton("Add"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + int a=JOptionPane.showConfirmDialog(btnNewButton,"Are you sure?"); + //JOptionPane.setRootFrame(null); + if(a==JOptionPane.YES_OPTION){ + + String name=bkname.getText(); + String writer= wrtrname.getText(); + String condition="New"; + String source=src.getText(); + String publisher=publs.getText(); + String subject= (String) sub.getSelectedItem(); + String prc=price.getText(); + String dt=(String) date.getSelectedItem(); + String mnth=(String) month.getSelectedItem(); + String yr=(String) year.getSelectedItem(); + + if(name != "" && writer != "" && source != null && prc != null && publisher != null) + { + String n="\n"; + + + JOptionPane.showMessageDialog(btnNewButton,"Congratulations,"+n+"Book is added sucessfully"+n+"Thankyou."); + } + else + { + + JOptionPane.showMessageDialog(btnNewButton,"Please,enter the informations"); + } + } + + } + }); + btnNewButton.setFont(new Font("Segoe UI", Font.PLAIN, 30)); + btnNewButton.setBounds(376, 318, 197, 80); + contentPane.add(btnNewButton); + } +} diff --git a/Add_old_books.java b/Add_old_books.java new file mode 100644 index 0000000..9f88137 --- /dev/null +++ b/Add_old_books.java @@ -0,0 +1,226 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import javax.swing.JRadioButton; +import javax.swing.JComboBox; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +public class Add_old_books extends JFrame { + + private JPanel contentPane; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Add_old_books frame = new Add_old_books(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Add_old_books() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + //setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 319, 1014, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("Book's name :- "); + lblNewLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + lblNewLabel.setBounds(59, 25, 145, 32); + contentPane.add(lblNewLabel); + + JLabel label = new JLabel("Writer's name :- "); + label.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label.setBounds(59, 101, 145, 32); + contentPane.add(label); + + JLabel label_1 = new JLabel("Condition :- "); + label_1.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_1.setBounds(59, 184, 145, 32); + contentPane.add(label_1); + + JTextArea bkname = new JTextArea(); + bkname.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + bkname.setBounds(235, 26, 166, 37); + contentPane.add(bkname); + + JTextArea wrtrname = new JTextArea(); + wrtrname.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + wrtrname.setBounds(235, 102, 166, 37); + contentPane.add(wrtrname); + + JRadioButton rdbtnNewRadioButton = new JRadioButton(" Old"); + rdbtnNewRadioButton.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + rdbtnNewRadioButton.setSelected(true); + rdbtnNewRadioButton.setEnabled(false); + rdbtnNewRadioButton.setBounds(235, 172, 75, 32); + contentPane.add(rdbtnNewRadioButton); + + JRadioButton rdbtnNewRadioButton_1 = new JRadioButton(" New"); + rdbtnNewRadioButton_1.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + rdbtnNewRadioButton_1.setSelected(false); + rdbtnNewRadioButton_1.setEnabled(false); + rdbtnNewRadioButton_1.setBounds(235, 213, 81, 26); + contentPane.add(rdbtnNewRadioButton_1); + + JLabel label_2 = new JLabel(" Published Date :- "); + label_2.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_2.setBounds(481, 25, 158, 32); + contentPane.add(label_2); + + JComboBox date = new JComboBox(); + for(int i=1;i<=31;i++) + { + String str=String.valueOf(i); + date.addItem(str); + } + date.setBounds(662, 32, 48, 27); + contentPane.add(date); + + JComboBox month = new JComboBox(); + month.setBounds(739, 32, 75, 27); + month.addItem("Jan"); + month.addItem("Feb"); + month.addItem("Mar"); + month.addItem("Apr"); + month.addItem("May"); + month.addItem("Jun"); + month.addItem("Jul"); + month.addItem("Aug"); + month.addItem("Sep"); + month.addItem("Oct"); + month.addItem("Nov"); + month.addItem("Dec"); + contentPane.add(month); + + JComboBox year = new JComboBox(); + for(int i=1901;i<=2018;i++) + { + String str=String.valueOf(i); + year.addItem(str); + } + year.setBounds(841, 32, 109, 27); + contentPane.add(year); + + JLabel label_3 = new JLabel(" Subject's name :- "); + label_3.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_3.setBounds(481, 184, 158, 32); + contentPane.add(label_3); + + JComboBox sub = new JComboBox(); + sub.setBounds(662, 188, 166, 32); + sub.addItem("English"); + sub.addItem("Hindi"); + sub.addItem("Bengali"); + sub.addItem("Maths"); + sub.addItem("Physics"); + sub.addItem("Chemistry"); + sub.addItem("Biology"); + sub.addItem("Computer"); + sub.addItem("History"); + sub.addItem("Geography"); + sub.addItem("Others"); + contentPane.add(sub); + + JLabel label_4 = new JLabel(" Price (INR) :- "); + label_4.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_4.setBounds(481, 261, 145, 32); + contentPane.add(label_4); + + JTextArea publs = new JTextArea(); + publs.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + publs.setBounds(662, 102, 166, 37); + contentPane.add(publs); + + JLabel label_5 = new JLabel(" Publisher name :- "); + label_5.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_5.setBounds(481, 101, 169, 32); + contentPane.add(label_5); + + JTextArea price = new JTextArea(); + price.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + price.setBounds(662, 262, 166, 37); + contentPane.add(price); + + JLabel label_6 = new JLabel("Source :- "); + label_6.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_6.setBounds(59, 261, 145, 32); + contentPane.add(label_6); + + JTextArea src = new JTextArea(); + src.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + src.setBounds(235, 262, 166, 37); + contentPane.add(src); + + JButton btnNewButton = new JButton("Add"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + int a=JOptionPane.showConfirmDialog(btnNewButton,"Are you sure?"); + //JOptionPane.setRootFrame(null); + if(a==JOptionPane.YES_OPTION){ + + String name=bkname.getText(); + String writer= wrtrname.getText(); + String condition="Old"; + String source=src.getText(); + String publisher=publs.getText(); + String subject= (String) sub.getSelectedItem(); + String prc=price.getText(); + String dt=(String) date.getSelectedItem(); + String mnth=(String) month.getSelectedItem(); + String yr=(String) year.getSelectedItem(); + + if(name != "" && writer != "" && source != null && prc != null && publisher != null) + { + String n="\n"; + + + JOptionPane.showMessageDialog(btnNewButton,"Congratulations,"+n+"Book is added sucessfully"+n+"Thankyou."); + } + else + { + + JOptionPane.showMessageDialog(btnNewButton,"Please,enter the informations"); + } + } + + } + }); + btnNewButton.setFont(new Font("Segoe UI", Font.PLAIN, 30)); + btnNewButton.setBounds(376, 318, 197, 80); + contentPane.add(btnNewButton); + } +} diff --git a/Address.java b/Address.java new file mode 100644 index 0000000..93c71f6 --- /dev/null +++ b/Address.java @@ -0,0 +1,135 @@ +package Textbook_selling_system; + +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Font; + +import javax.swing.JFrame; +import javax.swing.JInternalFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.border.EmptyBorder; +import javax.swing.JEditorPane; +import javax.swing.JButton; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import java.awt.ScrollPane; +import java.awt.Toolkit; +import java.awt.event.ActionListener; +import java.util.Random; +import java.awt.event.ActionEvent; + +public class Address extends JFrame { + + private JPanel contentPane; + public String name; + public String pin; + public String addl; + public String landmark; + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Address frame = new Address(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Address() { + // setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(650, 319, 514, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + + JLabel name = new JLabel("Full Name :- "); + name.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + name.setBounds(26, 13, 117, 41); + contentPane.add(name); + + JTextArea namet = new JTextArea(); + namet.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + namet.setBounds(155, 15, 325, 39); + contentPane.add(namet); + + JLabel label = new JLabel("Pincode :- "); + label.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label.setBounds(26, 74, 117, 41); + contentPane.add(label); + + JTextArea pint = new JTextArea(); + pint.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + pint.setBounds(155, 79, 165, 41); + contentPane.add(pint); + + JLabel label_1 = new JLabel("Address :- "); + label_1.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_1.setBounds(26, 150, 117, 41); + contentPane.add(label_1); + + JEditorPane editorPane = new JEditorPane(); + editorPane.setBounds(155, 133, 325, 124); + contentPane.add(editorPane); + + JLabel label_2 = new JLabel("Landmark :- "); + label_2.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + label_2.setBounds(26, 282, 117, 41); + contentPane.add(label_2); + + JTextArea landmarkt = new JTextArea(); + landmarkt.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + landmarkt.setBounds(155, 287, 165, 41); + contentPane.add(landmarkt); + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + + JButton btnAdd = new JButton("Add"); + btnAdd.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + dispose(); + int a=JOptionPane.showConfirmDialog(btnAdd, "Are you ready to process your order?"); + if(a==JOptionPane.YES_OPTION) + { + String name=namet.getText(); + String pin=pint.getText(); + String add=editorPane.getText(); + String landmark=landmarkt.getText(); + + + Random rand=new Random(); + int i=rand.nextInt(9999999); + String tktno=String.valueOf(i); + tktno+="\n"; + String n="\n"; + //seatb+=")\n"; + + String id=String.valueOf(i); + + + JOptionPane.showMessageDialog(btnAdd,"Congratulations,"+n+"Your order is successfully placed"+n+"Your Order Id is "+i+n+"Thankyou."); + + + //JOptionPane.showMessageDialog(btnAdd, "Cogratulations,Your order is successfully placed"); + } + } + }); + btnAdd.setBounds(148, 338, 172, 74); + contentPane.add(btnAdd); + } +} diff --git a/AdminHost.java b/AdminHost.java new file mode 100644 index 0000000..ae23c73 --- /dev/null +++ b/AdminHost.java @@ -0,0 +1,208 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTree; +import javax.swing.event.AncestorListener; +import javax.swing.event.AncestorEvent; +import javax.swing.JTable; +import javax.swing.JScrollBar; +import javax.swing.JEditorPane; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.ImageIcon; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JLabel; +import java.awt.Font; + +public class AdminHost extends JFrame { + + private JPanel contentPane; + private JTable table; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + AdminHost frame = new AdminHost(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public AdminHost() { + + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JMenuBar menuBar = new JMenuBar(); + menuBar.setBounds(0, 0, 1008, 26); + contentPane.add(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Main Menu"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmAddOldBooks = new JMenuItem("Add Old Books"); + mntmAddOldBooks.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_old_books obj=new Add_old_books(); + obj.setVisible(true); + } + }); + mnNewMenu_1.add(mntmAddOldBooks); + + JMenuItem mntmAddNewBooks = new JMenuItem("Add New Books"); + mntmAddNewBooks.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_new_books obj=new Add_new_books(); + obj.setVisible(true); + } + }); + mnNewMenu_1.add(mntmAddNewBooks); + + JMenu menu = new JMenu("Manage"); + menuBar.add(menu); + + + + JMenu mnNewMenu_2 = new JMenu("Orders"); + menu.add(mnNewMenu_2); + + JMenuItem menuItem1 = new JMenuItem("Show Orders"); + mnNewMenu_2.add(menuItem1); + + JMenuItem menuItem2 = new JMenuItem("Manage Orders"); + mnNewMenu_2.add(menuItem2); + + JMenu mnNewMenu_3 = new JMenu("User/Admin"); + menu.add(mnNewMenu_3); + + + JMenuItem menuItem_1 = new JMenuItem("Manage Users"); + mnNewMenu_3.add(menuItem_1); + + JMenuItem menuItem_2 = new JMenuItem("Manage Admins"); + mnNewMenu_3.add(menuItem_2); + + JButton btnNewButton = new JButton("Log Out"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + int a=JOptionPane.showConfirmDialog(btnNewButton,"Are you sure?"); + //JOptionPane.setRootFrame(null); + if(a==JOptionPane.YES_OPTION){ + + dispose(); + Main_screen ms=new Main_screen(); + ms.setTitle("Book Hub"); + ms.setVisible(true); + } + } + }); + btnNewButton.setBounds(899, 39, 97, 25); + contentPane.add(btnNewButton); + + JButton add = new JButton("Add old books"); + add.setFont(new Font("Tahoma", Font.PLAIN, 29)); + add.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_old_books obj=new Add_old_books(); + obj.setVisible(true); + } + }); + add.setBounds(46, 197, 264, 118); + contentPane.add(add); + + JButton btnNewButton_1 = new JButton("Add new Books"); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 29)); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_new_books obj=new Add_new_books(); + obj.setVisible(true); + } + }); + btnNewButton_1.setBounds(374, 197,264, 118); + contentPane.add(btnNewButton_1); + + JButton button = new JButton("Show orders"); + button.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Show_bookings obj=new Show_bookings(); + obj.setVisible(true); + } + }); + button.setBounds(699, 197, 264, 118); + contentPane.add(button); + + JButton button_1 = new JButton("Manage users"); + button_1.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button_1.setBounds(374, 366, 264, 118); + contentPane.add(button_1); + + JButton button_2 = new JButton("Manage Orders"); + button_2.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button_2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + button_2.setBounds(46, 366, 264, 118); + contentPane.add(button_2); + + JButton button_3 = new JButton("Manage Admin"); + button_3.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button_3.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + button_3.setBounds(699, 366, 264, 118); + contentPane.add(button_3); + + JMenu mnNewMenu = new JMenu("New menu"); + mnNewMenu.setBounds(0, 39, 58, -32); + contentPane.add(mnNewMenu); + + JLabel label = new JLabel(""); + label.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\37467261-books-wallpaper (Custom).jpg")); + label.setBounds(0, 26, 1008, 536); + contentPane.add(label); + + + + + + + + + + } +} diff --git a/AdminLogin.java b/AdminLogin.java new file mode 100644 index 0000000..07aa629 --- /dev/null +++ b/AdminLogin.java @@ -0,0 +1,147 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.Color; + +import javax.swing.*; +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; + +import javax.swing.border.EmptyBorder; + +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import java.awt.Color; + +public class AdminLogin extends JFrame { + + private JPanel contentPane; + private JTextField textField; + private JPasswordField passwordField; + private JButton btnNewButton; + private JButton btnNewButton_1; + private String user[]={"Soumyadip","Soumya"}; + private String pass[]={"abcd","abcde"}; + private JLabel lblNewLabel_1; + private JLabel label; + private JLabel label_1; + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + AdminLogin frame = new AdminLogin(); + frame.setTitle("Book Hub"); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public AdminLogin() { + setResizable(false); + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + // .getContentPane().//(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\STDM.jpg")); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("Admin Login"); + lblNewLabel.setForeground(new Color(255, 255, 102)); + lblNewLabel.setFont(new Font("Times New Roman", Font.PLAIN, 46)); + lblNewLabel.setBounds(364, 60, 273, 93); + contentPane.add(lblNewLabel); + + textField = new JTextField(); + textField.setFont(new Font("Tahoma", Font.PLAIN, 32)); + textField.setBounds(481, 170, 281, 68); + contentPane.add(textField); + textField.setColumns(10); + + passwordField = new JPasswordField(); + passwordField.setFont(new Font("Tahoma", Font.PLAIN, 32)); + passwordField.setBounds(481, 286, 281, 68); + contentPane.add(passwordField); + + JLabel lblUsername = new JLabel("Username"); + lblUsername.setForeground(new Color(255, 255, 255)); + lblUsername.setFont(new Font("Tahoma", Font.PLAIN, 31)); + lblUsername.setBounds(250, 166, 193, 52); + contentPane.add(lblUsername); + + JLabel lblPassword = new JLabel("Password"); + lblPassword.setForeground(new Color(255, 255, 255)); + lblPassword.setBackground(Color.CYAN); + lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 31)); + lblPassword.setBounds(250, 286, 193, 52); + contentPane.add(lblPassword); + + btnNewButton = new JButton("Login"); + btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 26)); + btnNewButton.setBounds(545, 392, 162, 73); + btnNewButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + int i=0,j=0; + String ustr=textField.getText(); + String pstr=passwordField.getText(); + + + if( ustr.equals("Soumya") && pstr.equals("1234")) + { + dispose(); + AdminHost ah=new AdminHost(); + ah.setTitle("Book Hub"); + ah.setVisible(true); + JOptionPane.showMessageDialog(btnNewButton, "You have successfully logged in"); + } + else + { + JOptionPane.showMessageDialog(btnNewButton, "Wrong Username & Password"); + } + } + }); + + contentPane.add(btnNewButton); + + btnNewButton_1 = new JButton("User Login"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + Userlogin us=new Userlogin(); + us.setTitle("Book Hub"); + us.setVisible(true); + } + }); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 26)); + btnNewButton_1.setBounds(250, 387, 193, 83); + contentPane.add(btnNewButton_1); + + label_1 = new JLabel(""); + label_1.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\books-wallpaper-49796-51475-hd-wallpapers (Custom).jpg")); + label_1.setBounds(0, 0, 1008, 562); + contentPane.add(label_1); + + + + } + +} diff --git a/Book Selling System Java-Using Swing-Mysql/Jenkinsfile b/Book Selling System Java-Using Swing-Mysql/Jenkinsfile new file mode 100644 index 0000000..39a8d19 --- /dev/null +++ b/Book Selling System Java-Using Swing-Mysql/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout scm + } + } + stage('SCM') { + steps { + // Checkout the code from Git + checkout([$class: 'GitSCM', + branches: [[name: '*/main']], + doGenerateSubmoduleConfigurations: false, + extensions: [], + submoduleCfg: [], + userRemoteConfigs: [[url: 'https://github.com/BhushanShete/Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software.git']]]) + } + } + + stage('SonarQube Analysis') { + environment { + scannerHome = tool name: 'SonarScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation' + } + steps { + script { + def scannerHome = tool name: 'SonarScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation' + def mvn = tool 'mvn'; + withSonarQubeEnv('bhushan') { + bat "${mvn} clean verify sonar:sonar -Dsonar.projectKey=bhushanJAVA -Dsonar.projectName='bhushanJAVA'" + + } + } + } + } + } +} diff --git a/Book Selling System Java-Using Swing-Mysql/pom.xml b/Book Selling System Java-Using Swing-Mysql/pom.xml new file mode 100644 index 0000000..5ea01ca --- /dev/null +++ b/Book Selling System Java-Using Swing-Mysql/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + com.example + my-project + 1.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + +Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software +A sample Maven project +https://github.com/BhushanShete/Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software + + diff --git a/Book Selling System Java-Using Swing-Mysql/sonar-project.properties b/Book Selling System Java-Using Swing-Mysql/sonar-project.properties new file mode 100644 index 0000000..7cdbf72 --- /dev/null +++ b/Book Selling System Java-Using Swing-Mysql/sonar-project.properties @@ -0,0 +1,22 @@ +#----- Default SonarQube server +sonar.host.url=http://localhost:9000/ + +#----- Default source code encoding +sonar.sourceEncoding=UTF-8 + +sonar.token=sqa_e9713d073756a25f931823cc03b187d32fbcb47c + +# Project identification +sonar.projectKey=bhushanJAVA +sonar.projectName=bhushanJAVA +sonar.projectVersion=1.0 + +# Define multiple binary directories using a comma-separated list + +sonar.java.binaries=**/*.class +#sonar.exclusions=**/*.java +#sonar.sources=src/main +#sonar.tests=src/test +#sonar.sources=src/main/java +#sonar.java.binaries=./target/classes +#sonar.java.test.binaries=target/test-classes diff --git a/Book_selling_system.java b/Book_selling_system.java new file mode 100644 index 0000000..3e350c0 --- /dev/null +++ b/Book_selling_system.java @@ -0,0 +1,19 @@ +package Textbook_selling_system; + +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ + +public class Book_selling_system { + + + public static void main(String args[]) + { + Main_screen ms=new Main_screen(); + ms.setTitle("Book Hub"); + ms.setVisible(true); + } +} diff --git a/BuyBooks.java b/BuyBooks.java new file mode 100644 index 0000000..5a03032 --- /dev/null +++ b/BuyBooks.java @@ -0,0 +1,87 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.table.DefaultTableModel; +import javax.swing.JTable; +import javax.swing.JProgressBar; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +public class BuyBooks extends JFrame { + + private JPanel contentPane; + + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + BuyBooks frame = new BuyBooks(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public BuyBooks() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setBounds(450, 319, 1014, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + String col[]={"Book name","Price","Writter"}; + String data[][]={{"Eng","AAA","S.C"}}; + + JTable table = new JTable(data,col); + DefaultTableModel md=new DefaultTableModel(); + md.setColumnIdentifiers(col); + + table.setModel(md); + + table.setBounds(0, 0, 1008, 303); + table.setFillsViewportHeight(true); + contentPane.add(table); + + JProgressBar progressBar = new JProgressBar(); + progressBar.setBounds(157, 193, 146, 14); + contentPane.add(progressBar); + + JButton btnNewButton = new JButton("Buy"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Address obj=new Address(); + obj.setVisible(true); + + //contentPane.add(obj); + // JOptionPane.showMessageDialog(btnNewButton, "Co; + } + }); + btnNewButton.setBounds(430, 316, 168, 96); + contentPane.add(btnNewButton); + } +} diff --git a/Create_ac.java b/Create_ac.java new file mode 100644 index 0000000..1097a23 --- /dev/null +++ b/Create_ac.java @@ -0,0 +1,248 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.Statement; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.border.EmptyBorder; +import javax.swing.ImageIcon; +import java.awt.Color; + +public class Create_ac extends JFrame { + + private JPanel contentPane; + private JTextField firstname; + private JTextField lastname; + private JTextField email; + private JTextField username; + private JTextField mob; + private JPasswordField passwordField; + private JButton btnNewButton; + private JButton btnNewButton_1; + private JButton btnNewButton_2; + private JLabel label; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Create_ac frame = new Create_ac(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + + public Create_ac() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewUserRegister = new JLabel("New User Register"); + lblNewUserRegister.setForeground(new Color(102, 255, 0)); + lblNewUserRegister.setFont(new Font("Times New Roman", Font.PLAIN, 42)); + lblNewUserRegister.setBounds(362, 52, 325, 50); + contentPane.add(lblNewUserRegister); + + JLabel lblName = new JLabel("First name"); + lblName.setForeground(new Color(255, 204, 51)); + lblName.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblName.setBounds(58, 151, 99, 43); + contentPane.add(lblName); + + JLabel lblNewLabel = new JLabel("Last name"); + lblNewLabel.setForeground(new Color(255, 204, 0)); + lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblNewLabel.setBounds(58, 243, 110, 29); + contentPane.add(lblNewLabel); + + JLabel lblEmailAddress = new JLabel("Email\r\n address"); + lblEmailAddress.setForeground(new Color(255, 204, 0)); + lblEmailAddress.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblEmailAddress.setBounds(58, 324, 124, 36); + contentPane.add(lblEmailAddress); + + firstname = new JTextField(); + firstname.setFont(new Font("Tahoma", Font.PLAIN, 32)); + firstname.setBounds(214, 151, 228, 50); + contentPane.add(firstname); + firstname.setColumns(10); + + lastname = new JTextField(); + lastname.setFont(new Font("Tahoma", Font.PLAIN, 32)); + lastname.setBounds(214, 235, 228, 50); + contentPane.add(lastname); + lastname.setColumns(10); + + email = new JTextField(); + + email.setFont(new Font("Tahoma", Font.PLAIN, 32)); + email.setBounds(214, 320, 228, 50); + contentPane.add(email); + email.setColumns(10); + + username = new JTextField(); + username.setFont(new Font("Tahoma", Font.PLAIN, 32)); + username.setBounds(707, 151, 228, 50); + contentPane.add(username); + username.setColumns(10); + + JLabel lblUsername = new JLabel("Username"); + lblUsername.setForeground(new Color(255, 204, 0)); + lblUsername.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblUsername.setBounds(542, 159, 99, 29); + contentPane.add(lblUsername); + + JLabel lblPassword = new JLabel("Password"); + lblPassword.setForeground(new Color(255, 204, 0)); + lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblPassword.setBounds(542, 245, 99, 24); + contentPane.add(lblPassword); + + JLabel lblMobileNumber = new JLabel("Mobile number"); + lblMobileNumber.setForeground(new Color(255, 204, 0)); + lblMobileNumber.setFont(new Font("Tahoma", Font.PLAIN, 20)); + lblMobileNumber.setBounds(542, 329, 139, 26); + contentPane.add(lblMobileNumber); + + mob = new JTextField(); + mob.setFont(new Font("Tahoma", Font.PLAIN, 32)); + mob.setBounds(707, 320, 228, 50); + contentPane.add(mob); + mob.setColumns(10); + + passwordField = new JPasswordField(); + passwordField.setFont(new Font("Tahoma", Font.PLAIN, 32)); + passwordField.setBounds(707, 235, 228, 50); + contentPane.add(passwordField); + + btnNewButton = new JButton("Register"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String first=firstname.getText(); + String last=lastname.getText(); + String emailadd=email.getText(); + String user1=username.getText(); + String mb=mob.getText(); + int len=mb.length(); + String pass1=passwordField.getText(); + + String msg=""+first; + msg+=" \n"; + if(len==10) + { + try{ + // String drivername="com.microsoft.sqlserver.jdbc.SQLServerDriver"; + // Class.forName("com.mysql.jdbc.Driver"); + Class.forName("com.mysql.cj.jdbc.Driver"); + Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/book selling system","root",""); + //Statement st=con.createStatement(); + + String query="INSERT INTO account VALUES('"+first+"','"+last+"','"+user1+"','"+pass1+"','"+emailadd+"','"+mb+"')"; + Statement sta=con.createStatement(); + int x=sta.executeUpdate(query); + if(x==0) + { + JOptionPane.showMessageDialog(btnNewButton, "User name is alredy exist"); + } + else + { + JOptionPane.showMessageDialog(btnNewButton,"Welcome, "+msg+"Your account is sucessfully created"); + } + con.close(); + } + catch(Exception f) + { + System.out.println(f.getMessage()); + } + } + else + { + JOptionPane.showMessageDialog(btnNewButton, "Enter a valid mobile number"); + } + + + /* try{ + String drivername="com.microsoft.sqlserver.jdbc.SQLServerDriver";//driver name + Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); + String db="jdbc:sqlserver://PERSONAL\\SQLEXPRESS:1433;databaseName=test"; + String user="PERSONAL/Soumyadeep"; + String pass=""; + String query="SELECT * FROM INSERT INTO user_details('','"+first+"','"+last+"','"+user1+"','"+pass1+"','"+emailadd+"','"+mb+"')"; + Connection con=DriverManager.getConnection(db,user,pass); + Statement st=con.createStatement(); + int x=st.executeUpdate(query); + if(x==1) + { + JOptionPane.showMessageDialog(btnNewButton, "This is alredy exist"); + } + con.close(); + } + catch(Exception f) + { + System.out.println(f.getMessage()); + } */ + //JOptionPane.showMessageDialog(btnNewButton,"Welcome, "+msg+"Your account is sucessfully created"); + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton.setBounds(345, 397, 139, 50); + contentPane.add(btnNewButton); + + btnNewButton_1 = new JButton("Already Have Account ? Sign in"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + Userlogin us=new Userlogin(); + us.setTitle("Book Hub"); + us.setVisible(true); + } + }); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton_1.setBounds(297, 474, 435, 50); + contentPane.add(btnNewButton_1); + + btnNewButton_2 = new JButton("Reset\r\n\r\n\r\n"); + btnNewButton_2.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton_2.setBounds(542, 397, 139, 50); + contentPane.add(btnNewButton_2); + + label = new JLabel(""); + label.setForeground(new Color(255, 204, 0)); + label.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\3 (Custom).jpg")); + label.setBounds(0, 0, 1008, 562); + contentPane.add(label); + } +} diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..39a8d19 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout scm + } + } + stage('SCM') { + steps { + // Checkout the code from Git + checkout([$class: 'GitSCM', + branches: [[name: '*/main']], + doGenerateSubmoduleConfigurations: false, + extensions: [], + submoduleCfg: [], + userRemoteConfigs: [[url: 'https://github.com/BhushanShete/Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software.git']]]) + } + } + + stage('SonarQube Analysis') { + environment { + scannerHome = tool name: 'SonarScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation' + } + steps { + script { + def scannerHome = tool name: 'SonarScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation' + def mvn = tool 'mvn'; + withSonarQubeEnv('bhushan') { + bat "${mvn} clean verify sonar:sonar -Dsonar.projectKey=bhushanJAVA -Dsonar.projectName='bhushanJAVA'" + + } + } + } + } + } +} diff --git a/Main_screen.java b/Main_screen.java new file mode 100644 index 0000000..d4bb2db --- /dev/null +++ b/Main_screen.java @@ -0,0 +1,117 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; + +public class Main_screen extends JFrame { + + /** + * + */ + private static final long serialVersionUID = 1L; + private JPanel contentPane; + +// MainScreen frame; + + + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + + Main_screen frame = new Main_screen(); + frame.setTitle(""); + frame.setVisible(true); + + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + + } + + /** + * Create the frame. + */ + public Main_screen() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + setResizable(false); + //contentPane.setTitle(); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("Book Hub"); + lblNewLabel.setBackground(new Color(255, 200, 0)); + lblNewLabel.setForeground(new Color(204, 255, 0)); + lblNewLabel.setFont(new Font("Comic Sans MS", Font.PLAIN, 50)); + lblNewLabel.setBounds(54, 0, 230, 98); + contentPane.add(lblNewLabel); + + JButton AdminBtn = new JButton("Admin Login"); + AdminBtn.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + AdminBtn.setFont(new Font("Tahoma", Font.PLAIN, 32)); + AdminBtn.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + AdminLogin ad=new AdminLogin(); + ad.setTitle("Book Hub"); + ad.setVisible(true); + } + }); + AdminBtn.setBounds(128, 245, 243, 93); + contentPane.add(AdminBtn); + + JButton UserBtn = new JButton("User Login"); + + UserBtn.setFont(new Font("Tahoma", Font.PLAIN, 32)); + UserBtn.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + Userlogin ad=new Userlogin(); + ad.setTitle("Book Hub"); + ad.setVisible(true); + } + }); + UserBtn.setBounds(647, 245, 243, 93); + contentPane.add(UserBtn); + + + + JLabel lblBuySellRecycle = new JLabel("Buy Sell Recycle"); + lblBuySellRecycle.setForeground(new Color(255, 255, 204)); + lblBuySellRecycle.setFont(new Font("Sylfaen", Font.PLAIN, 28)); + lblBuySellRecycle.setBounds(136, 52, 431, 86); + contentPane.add(lblBuySellRecycle); + + JLabel lblNewLabel_1 = new JLabel(""); + lblNewLabel_1.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + lblNewLabel_1.setBounds(0, 0, 1008, 562); + contentPane.add(lblNewLabel_1); + + } +} diff --git a/Request.java b/Request.java new file mode 100644 index 0000000..d0dd947 --- /dev/null +++ b/Request.java @@ -0,0 +1,98 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Font; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JTextArea; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JButton; +import javax.swing.JTextField; +import java.awt.event.ActionListener; +import java.util.Random; +import java.awt.event.ActionEvent; + +public class Request extends JFrame { + + private JPanel contentPane; + private JTextField textField; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Request frame = new Request(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Request() { + setBounds(450, 319, 1014, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JTextArea textArea = new JTextArea(); + textArea.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + textArea.setBounds(12, 66, 984, 276); + contentPane.add(textArea); + + JLabel lblNewLabel = new JLabel("Enter your Email :-"); + lblNewLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + lblNewLabel.setBounds(12, 13, 168, 39); + contentPane.add(lblNewLabel); + + + + textField = new JTextField(); + textField.setFont(new Font("Segoe UI", Font.PLAIN, 20)); + textField.setBounds(192, 13, 423, 39); + contentPane.add(textField); + textField.setColumns(10); + + JButton btnRequest = new JButton("Request"); + btnRequest.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + String email=textField.getText(); + String complain=textArea.getText(); + + + Random rand=new Random(); + int i=rand.nextInt(9999999); + String tktno=String.valueOf(i); + tktno+="\n"; + String n="\n"; + //seatb+=")\n"; + + String id=String.valueOf(i); + + JOptionPane.showMessageDialog(btnRequest,"Congratulations,"+n+"We have recived your request"+n+"We'll contact to you within 24 working hrs"+n+"Your Request id is"+i+n+"Thankyou."); + + } + }); + btnRequest.setFont(new Font("Segoe UI", Font.PLAIN, 30)); + btnRequest.setBounds(405, 355, 259, 57); + contentPane.add(btnRequest); + } +} diff --git a/Show_bookings.java b/Show_bookings.java new file mode 100644 index 0000000..2c04b41 --- /dev/null +++ b/Show_bookings.java @@ -0,0 +1,69 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; +import java.awt.EventQueue; +import java.awt.Toolkit; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.DefaultTableModel; +import javax.swing.JToggleButton; +import javax.swing.JTable; + +public class Show_bookings extends JFrame { + + private JPanel contentPane; + private final JTable table = new JTable(); + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Show_bookings frame = new Show_bookings(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Show_bookings() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setBounds(450, 319, 1014, 460); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + + String col[]={"Name","Username","Address","Book name","Price","Conition"}; + String col1[][] = null; + DefaultTableModel md=new DefaultTableModel(); + md.setColumnIdentifiers(col); + + + JTable jt=new JTable(col1,col); + jt.setBounds(1, 1, 1008, 425); + jt.setModel(md); + contentPane.add(jt); + //jt.addColumnSelectionInterval(col); + + + } + } diff --git a/UserHost.java b/UserHost.java new file mode 100644 index 0000000..e1bbe98 --- /dev/null +++ b/UserHost.java @@ -0,0 +1,196 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.border.EmptyBorder; +import javax.swing.JLabel; +import javax.swing.ImageIcon; + +public class UserHost extends JFrame { + + private JPanel contentPane; + private JTable table; + + +public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + UserHost frame = new UserHost(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); +} + +/** + * Create the frame. + */ + public UserHost() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + + // setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JMenuBar menuBar = new JMenuBar(); + menuBar.setBounds(0, 0, 1008, 26); + contentPane.add(menuBar); + + JMenu mnNewMenu_1 = new JMenu("Main Menu"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmAddOldBooks = new JMenuItem("Buy Books"); + mntmAddOldBooks.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + BuyBooks obj=new BuyBooks(); + obj.setVisible(true); + } + }); + mnNewMenu_1.add(mntmAddOldBooks); + + JMenuItem mntmAddNewBooks = new JMenuItem("Recycle your books"); + mntmAddNewBooks.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_old_books obj=new Add_old_books(); + obj.setVisible(true); + } + }); + mnNewMenu_1.add(mntmAddNewBooks); + + JMenu menu = new JMenu("Manage"); + menuBar.add(menu); + + + + JMenu mnNewMenu_2 = new JMenu("Orders"); + menu.add(mnNewMenu_2); + + JMenuItem menuItem1 = new JMenuItem("Show Orders"); + mnNewMenu_2.add(menuItem1); + + JMenuItem menuItem2 = new JMenuItem("Manage Orders"); + mnNewMenu_2.add(menuItem2); + + JMenu mnNewMenu_3 = new JMenu("User/Admin"); + menu.add(mnNewMenu_3); + + + JMenuItem menuItem_1 = new JMenuItem("Manage Users"); + mnNewMenu_3.add(menuItem_1); + + JMenuItem menuItem_2 = new JMenuItem("Manage Admins"); + mnNewMenu_3.add(menuItem_2); + + JButton btnNewButton = new JButton("Log Out"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + int a=JOptionPane.showConfirmDialog(btnNewButton,"Are you sure?"); + //JOptionPane.setRootFrame(null); + if(a==JOptionPane.YES_OPTION){ + + dispose(); + Main_screen ms=new Main_screen(); + ms.setTitle("Book Hub"); + ms.setVisible(true); + } + } + }); + btnNewButton.setBounds(899, 39, 97, 25); + contentPane.add(btnNewButton); + + JButton add = new JButton("Buy Books"); + add.setFont(new Font("Tahoma", Font.PLAIN, 29)); + add.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + BuyBooks obj=new BuyBooks(); + obj.setVisible(true); + } + }); + add.setBounds(46, 197, 264, 118); + contentPane.add(add); + JButton btnNewButton_1 = new JButton("Recycle Books "); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 29)); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Add_old_books obj=new Add_old_books(); + obj.setVisible(true); + } + }); + btnNewButton_1.setBounds(374, 197,264, 118); + contentPane.add(btnNewButton_1); + + JButton button = new JButton("History"); + button.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + BuyBooks obj=new BuyBooks(); + obj.setVisible(true); + } + }); + button.setBounds(699, 197, 264, 118); + contentPane.add(button); + + JButton button_1 = new JButton("Request"); + button_1.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Request obj=new Request(); + obj.setVisible(true); + } + }); + button_1.setBounds(237, 366, 264, 118); + contentPane.add(button_1); + + JButton button_3 = new JButton("Connect us"); + button_3.setFont(new Font("Tahoma", Font.PLAIN, 29)); + button_3.setBounds(550, 366, 264, 118); + contentPane.add(button_3); + + JLabel lblNewLabel = new JLabel("Book Hub"); + lblNewLabel.setBackground(new Color(255, 200, 0)); + lblNewLabel.setForeground(new Color(255, 255, 0)); + lblNewLabel.setFont(new Font("Comic Sans MS", Font.PLAIN, 50)); + lblNewLabel.setBounds(24, 25, 230, 98); + contentPane.add(lblNewLabel); + + + JLabel lblBuySellRecycle = new JLabel("Buy Sell Recycle"); + lblBuySellRecycle.setForeground(new Color(255, 255, 204)); + lblBuySellRecycle.setFont(new Font("Sylfaen", Font.PLAIN, 28)); + lblBuySellRecycle.setBounds(99, 84, 431, 86); + contentPane.add(lblBuySellRecycle); + + JLabel label = new JLabel(""); + label.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\why-you-should-read-and-re-read-these-high-school-books-as-an-adult (Custom) (Custom).jpeg")); + label.setBounds(0, 25, 1008, 537); + contentPane.add(label); + + + } +} diff --git a/Userlogin.java b/Userlogin.java new file mode 100644 index 0000000..8f382ed --- /dev/null +++ b/Userlogin.java @@ -0,0 +1,295 @@ +package Textbook_selling_system; +/** + * + * @author Soumyadip Chowdhury + * @github soumyadip007 + * + */ +import java.awt.BorderLayout; + +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.Statement; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.border.EmptyBorder; + +import com.mysql.cj.jdbc.StatementWrapper; + +import javax.swing.ImageIcon; +import java.awt.Color; + +import java.sql.*; +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.border.EmptyBorder; +import java.awt.Color; + +public class Userlogin extends JFrame { + + private JPanel contentPane; + private JTextField textField; + private JPasswordField passwordField; + private JButton btnNewButton; + private JButton btnNewButton_1; + private JButton btnNewButton_2; + private JButton btnNewButton_3; + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Userlogin frame = new Userlogin(); + + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public Userlogin() { + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg")); + + setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\STDM.jpg")); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(450, 190, 1014, 597); + setResizable(false); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + contentPane.setLayout(null); + + JLabel lblNewLabel = new JLabel("User Login"); + lblNewLabel.setForeground(new Color(255, 255, 0)); + lblNewLabel.setFont(new Font("Times New Roman", Font.PLAIN, 46)); + lblNewLabel.setBounds(373, 42, 273, 93); + contentPane.add(lblNewLabel); + + textField = new JTextField(); + textField.setFont(new Font("Tahoma", Font.PLAIN, 32)); + textField.setBounds(481, 170, 281, 68); + contentPane.add(textField); + textField.setColumns(10); + + passwordField = new JPasswordField(); + passwordField.setFont(new Font("Tahoma", Font.PLAIN, 32)); + passwordField.setBounds(481, 286, 281, 68); + contentPane.add(passwordField); + + JLabel lblUsername = new JLabel("Username"); + lblUsername.setForeground(new Color(255, 255, 255)); + lblUsername.setFont(new Font("Tahoma", Font.PLAIN, 31)); + lblUsername.setBounds(204, 178, 193, 52); + contentPane.add(lblUsername); + + JLabel lblPassword = new JLabel("Password"); + lblPassword.setForeground(new Color(255, 255, 255)); + lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 31)); + lblPassword.setBounds(204, 294, 193, 52); + contentPane.add(lblPassword); + + btnNewButton = new JButton("Login"); + btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton.setBounds(481, 387, 113, 52); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + int i=0,j=0; + String ustr=textField.getText(); + String pstr=passwordField.getText(); + + /* try{ + // String drivername="com.microsoft.sqlserver.jdbc.SQLServerDriver"; + // Class.forName("com.mysql.jdbc.Driver"); + Class.forName("com.mysql.cj.jdbc.Driver"); + Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/book selling system","root",""); + //Statement st=con.createStatement(); + + String query="Select user1 from account"; + Statement sta=con.createStatement(); + // resultSet x=sta.executeUpdate(query); + while(x!=1) + { + + } + if(x==0) + { + JOptionPane.showMessageDialog(btnNewButton, "Wrong user namet"); + } + else + { + // JOptionPane.showMessageDialog(btnNewButton,"Welcome, "+msg+"Your account is sucessfully created"); + dispose(); + UserHost uh=new UserHost(); + uh.setTitle("Book Hub"); + uh.setVisible(true); + JOptionPane.showMessageDialog(btnNewButton, "You have successfully logged in"); + } + con.close(); + } + catch(Exception f) + { + System.out.println(f.getMessage()); + }*/ + /** for(i=0;i<2;i++) + { + + if(pass[i].equals(ustr)) + { + for(j=0;j<2;j++) + { + if(pass[i].equals(pstr)) + { + JOptionPane.showMessageDialog(btnNewButton, "You have successfully logged in"); + break; + } + } + } + } + if(i==2 && j==0) + { + + JOptionPane.showMessageDialog(btnNewButton, "Wrong Username"); + } + else if(j==2) + { + JOptionPane.showMessageDialog(btnNewButton, "Wrong Password"); + } + + if( ustr.equals("Soumya") && pstr.equals("1234")) + { + dispose(); + UserHost uh=new UserHost(); + uh.setTitle("Book Hub"); + uh.setVisible(true); + JOptionPane.showMessageDialog(btnNewButton, "You have successfully logged in"); + } + else + { + JOptionPane.showMessageDialog(btnNewButton, "Wrong Username & Password"); + } + /* try + { + String drivername="com.microsoft.sqlserver.jdbc.SQLServerDriver";//driver name + Class.forName(drivername); + String db="jdbc:sqlserver://PERSONAL\\SQLEXPRESS:1433;databaseName=test";//connection string + String user="sa"; + String pass="1234"; + Connection con=DriverManager.getConnection(db,user,pass); + + + + + Statement st=con.createStatement(); + ResultSet rs=st.executeQuery("SELECT uid,username,password FROM user WHERE username='"+ ustr +"' AND password='"+ pstr +"'"); + while(rs.next()) + { + dispose(); + AdminLogin al=new AdminLogin(); + al.setVisible(true); + } + + + + } + catch(Exception e1) + { + System.out.println(e1); + }*. + + + /*try{ + Class.forName("oracle.jdbc.driver.OracleDriver"); + Connection con=(Connection) DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","soumya","1234"); + String query="select * from tlogin where user_name='"+ustr+"' and password='"+pstr+"'"; + Statement st=con.createStatement(); + int x=st.executeUpdate(query); + if(x==1) + { + JOptionPane.showMessageDialog(btnNewButton, "This is alredy exist"); + } + con.close(); + } + catch(Exception f) + { + System.out.println(f); + } */ + } + }); + + contentPane.add(btnNewButton); + + btnNewButton_1 = new JButton("Admin Login"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + AdminLogin al=new AdminLogin(); + al.setTitle("Book Hub"); + al.setVisible(true); + } + }); + btnNewButton_1.setFont(new Font("Tahoma", Font.PLAIN, 30)); + btnNewButton_1.setBounds(204, 419, 216, 83); + contentPane.add(btnNewButton_1); + + btnNewButton_2 = new JButton("Create new account"); + btnNewButton_2.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton_2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + dispose(); + Create_ac ca = new Create_ac(); + ca.setTitle("Book Hub"); + ca.setVisible(true); + } + }); + btnNewButton_2.setBounds(481, 470, 281, 52); + contentPane.add(btnNewButton_2); + + btnNewButton_3 = new JButton("Reset "); + btnNewButton_3.setFont(new Font("Tahoma", Font.PLAIN, 22)); + btnNewButton_3.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); + btnNewButton_3.setBounds(649, 387, 113, 52); + contentPane.add(btnNewButton_3); + + + JLabel label_1 = new JLabel(""); + label_1.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\books-wallpaper-49796-51475-hd-wallpapers (Custom).jpg")); + label_1.setBounds(0, 0, 1008, 562); + contentPane.add(label_1); + + + } + +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..0a937a2 --- /dev/null +++ b/index.html @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5ea01ca --- /dev/null +++ b/pom.xml @@ -0,0 +1,30 @@ + + + 4.0.0 + + com.example + my-project + 1.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + +Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software +A sample Maven project +https://github.com/BhushanShete/Java-JavaFx-Swing-Projects-Desktop-Application-GUI-Software + + diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..240e638 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,22 @@ +#----- Default SonarQube server +sonar.host.url=http://localhost:9000/ + +#----- Default source code encoding +sonar.sourceEncoding=UTF-8 + +sonar.token=sqa_e9713d073756a25f931823cc03b187d32fbcb47c + +# Project identification +sonar.projectKey=java2 +sonar.projectName=java2 +sonar.projectVersion=1.0 + +# Define multiple binary directories using a comma-separated list + +#sonar.java.binaries=**/*.class +#sonar.exclusions=**/*.java +#sonar.sources=src/main +#sonar.tests=src/test +sonar.sources=src/main/java +sonar.java.binaries=./target/classes +#sonar.java.test.binaries=target/test-classes