汽车配件系统

此项目是Java中的汽车配件系统。Java中的Car Accessories System是一个用于管理汽车附件详细信息的项目。 整个系统在Netbeans IDE中。 该系统是基于管理员的系统。要运行此项目,您必须在PC上安装Eclipse IDE或Netbeans IDE。 安装完成后,下载项目并解压缩。 在Netbeans IDE中打开项目。 并简单地运行项目。 现在,在运行项目之前,请针对任何类型的错误和错误重建项目。 这将帮助您控制运行时错误代码。如想了解详情请下载附件。

应用介绍

此项目是Java中的汽车配件系统。Java中的Car Accessories System是一个用于管理汽车附件详细信息的项目。 整个系统在Netbeans IDE中。 该系统是基于管理员的系统。 系统支持此系统此处所需的所有功能。 它包括用于添加详细信息和详细信息面板以将记录保留在系统中的附件表格。谈到Java项目,该系统非常简单,而且非常用户友好。 用户可以通过汽车附件表格添加附件及其详细信息。 系统主体包括:一个表格,用于输入有关附件的详细信息并将数据添加到记录表中,并且记录详细信息以存储添加的信息。记录详细信息表顶部有两个搜索按钮:按价格搜索配件、next搜索具有选定类别的所有数据并显示。要运行此项目,您必须在PC上安装Eclipse IDE或Netbeans IDE。 安装完成后,下载项目并解压缩。 在Netbeans IDE中打开项目。 并简单地运行项目。 现在,在运行项目之前,请针对任何类型的错误和错误重建项目。 这将帮助您控制运行时错误代码。本人只展示了一小段代码,如想了解详情请下载附件。

package coursework;

import java.awt.Desktop;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
import javax.swing.table.DefaultTableModel;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Riya Nakarmi ,Sagar Parajuli, Prayag Joshi, Prabin Dura, Raj Kumar Gurung
 */
public class CAD_Info extends javax.swing.JFrame {
   
   
    /**
     * Creates new form CAD_Info
     */
   //constructor of the class
    public CAD_Info() {
        initComponents();
         setResizable(false);
         setLocationRelativeTo(null);
        
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */   
    private int binarySearch(int[] a, int x) {
        //Uses binary search algorithm to search the accessory items
        Arrays.sort(a);
        //  System.out.println(Arrays.toString(a));
        int size = a.length;
        int lowIndex = 0;
        int highIndex = size - 1;
        while (lowIndex <= highIndex) {
            int mid = (lowIndex +highIndex ) / 2;
            if (a[mid] == x) {
                return a[mid];
            } else if (x > a[mid]) {
                lowIndex = mid + 1;
            } else {
                highIndex = mid - 1;
            }
        }
        return -1;
    }
 
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;
        jFileChooser = new javax.swing.JFileChooser();
        bodyPanel = new javax.swing.JPanel();
        jTabbedPane = new javax.swing.JTabbedPane();
        detailsPanel = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        priceSrch = new javax.swing.JTextField();
        priceSrchbtn = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        table = new javax.swing.JTable();
        delItembtn = new javax.swing.JButton();
        delAllbtn = new javax.swing.JButton();
        categorySrch = new javax.swing.JComboBox<>();
        catSrchbtn = new javax.swing.JButton();
        formPanel = new javax.swing.JPanel();
        mainFormPanel = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        idtf = new javax.swing.JTextField();
        nametf = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        category = new javax.swing.JComboBox<>();
        jLabel6 = new javax.swing.JLabel();
        company = new javax.swing.JRadioButton();
        community = new javax.swing.JRadioButton();
        none = new javax.swing.JRadioButton();
        jLabel7 = new javax.swing.JLabel();
        high = new javax.swing.JRadioButton();
        low = new javax.swing.JRadioButton();
        medium = new javax.swing.JRadioButton();
        jLabel8 = new javax.swing.JLabel();
        pricetf = new javax.swing.JTextField();
        addbtn = new javax.swing.JButton();
        clearbtn = new javax.swing.JButton();
        titlePanel = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jMenuBar = new javax.swing.JMenuBar();
        menu = new javax.swing.JMenu();
        open = new javax.swing.JCheckBoxMenuItem();
        exit = new javax.swing.JCheckBoxMenuItem();
        help = new javax.swing.JMenu();
        helpmenu = new javax.swing.JCheckBoxMenuItem();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        bodyPanel.setLayout(new javax.swing.OverlayLayout(bodyPanel));
        jTabbedPane.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        detailsPanel.setBackground(new java.awt.Color(0, 102, 102));
        jLabel1.setBackground(new java.awt.Color(0, 102, 153));
        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Car Accessories Details");
        priceSrch.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        priceSrchbtn.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        priceSrchbtn.setText("Search By Price");
        priceSrchbtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                priceSrchbtnActionPerformed(evt);
            }
        });
        table.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        table.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                { new Integer(1), "Bluetooth", "Media", "1000", "medium", "By Company"},
                { new Integer(2), "Air freshner", "Ambience", "1500", "medium", "None"},
                { new Integer(3), "Air bags", "Comfort", "13000", "high", "None"},
                { new Integer(4), "USB charger", "Media", "500", "low", "By Commmunity"},
                { new Integer(5), "Seat cover", "Interior", "6000", "high", "None"},
                { new Integer(6), "Floor mats", "Interior", "1000", "medium", "By Company"},
                { new Integer(7), "Sun roof", "Ambience", "3000", "medium", "By Company"},
                { new Integer(8), "Emergency supply", "Comfort", "1200", "medium", "None"},
                { new Integer(9), "Lighting", "Ambience", "1500", "medium", "None"},
                { new Integer(10), "Seat design", "Comfort", "10000", "high", "None"},
                { new Integer(11), "Armrest", "Comfort", "700", "low", "None"},
                { new Integer(12), "Mobile holder", "Interior", "650", "low", "None"}
            },
            new String [] {
                "Accessory ID", "Accessory Name", "Category", "Price", "Price Range", "Recommendation"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class, java.lang.String.class, java.lang.String.class
            };
            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        table.setShowGrid(true);
        table.setSurrendersFocusOnKeystroke(true);
        jScrollPane1.setViewportView(table);
        delItembtn.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        delItembtn.setText("Delete item");
        delItembtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                delItembtnActionPerformed(evt);
            }
        });
        delAllbtn.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        delAllbtn.setText("Delete all");
        delAllbtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                delAllbtnActionPerformed(evt);
            }
        });
        categorySrch.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        categorySrch.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Security ", "Comfort", "Ambience", "Media", "Interior" }));
        categorySrch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                categorySrchActionPerformed(evt);
            }
        });
        catSrchbtn.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        catSrchbtn.setText("Search By Category");
        catSrchbtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                catSrchbtnActionPerformed(evt);
            }
        });
        javax.swing.GroupLayout detailsPanelLayout = new javax.swing.GroupLayout(detailsPanel);
        detailsPanel.setLayout(detailsPanelLayout);
        detailsPanelLayout.setHorizontalGroup(
         .........................................
..............................................

文件列表(部分)

名称 大小 修改日期
lib0.00 KB2019-11-18
unknown0.00 KB2019-11-18
binary0.00 KB2019-11-18
AbsoluteLayout0.00 KB2019-11-18
SNAPSHOT0.00 KB2019-11-18
AbsoluteLayout-SNAPSHOT.jar9.83 KB2019-11-18
pom.xml1.24 KB2019-11-18
src0.00 KB2019-11-16
main0.00 KB2019-11-42
java0.00 KB2020-01-32
com0.00 KB2019-11-42
mycompany0.00 KB2019-11-42
cad_is0.00 KB2019-11-42
coursework0.00 KB2020-01-24
CAD_Info.form53.77 KB2020-01-10
CAD_Info.java48.46 KB2020-01-10
test0.00 KB2019-11-16
java0.00 KB2019-11-16
target0.00 KB2020-01-06
CAD_IS-1.0-SNAPSHOT.jar25.43 KB2020-01-06
classes0.00 KB2020-01-04
coursework0.00 KB2020-01-20
CAD_Info$1.class0.72 KB2020-01-20
CAD_Info$10.class0.71 KB2020-01-20
CAD_Info$11.class0.71 KB2020-01-20
CAD_Info$12.class0.71 KB2020-01-20
CAD_Info$13.class0.72 KB2020-01-20
CAD_Info$14.class0.72 KB2020-01-20
CAD_Info$15.class0.72 KB2020-01-20
CAD_Info$16.class0.71 KB2020-01-20
CAD_Info$17.class0.71 KB2020-01-20
CAD_Info$18.class0.71 KB2020-01-20

立即下载

相关下载

[汽车配件系统] 此项目是Java中的汽车配件系统。Java中的Car Accessories System是一个用于管理汽车附件详细信息的项目。 整个系统在Netbeans IDE中。 该系统是基于管理员的系统。要运行此项目,您必须在PC上安装Eclipse IDE或Netbeans IDE。 安装完成后,下载项目并解压缩。 在Netbeans IDE中打开项目。 并简单地运行项目。 现在,在运行项目之前,请针对任何类型的错误和错误重建项目。 这将帮助您控制运行时错误代码。如想了解详情请下载附件。

评论列表 共有 0 条评论

暂无评论

微信捐赠

微信扫一扫体验

立即
上传
发表
评论
返回
顶部