Inventory and POS System. Stage 2/5

Supply orders

Report a typo

Description

In this stage, you need to help the Merchant keep track of all incoming orders in an extended table.

So far, we are leaving the incoming orders as they are, and the Merchant has lost track of the inventory. During this stage, you need to build a second GUI screen that contains JTable with a detailed description of the orders. This view should also contain a filter button for each supplier.

Objectives

At this stage, your program should behave like this:

  1. The main window should contain a JTabbedPane (named TabbedPane) that allows switching between two views. The first tab which is used to select the type of wine should be titled Input Supplier Order and the new tab should be titled Supplier Orders List.
  2. Set a new JPanel for Supplier Orders List tab and add three Swing components:
  • A JComboBox - a dropdown box that contains all the supplier names. Name this element as SupplierOrderComboBox;
  • A JButton - a button that enables filtering per supplier. Name it as FilterButton and set its text to Filter. The top element of the dropdown menu should be All Orders which should allow users to go back and view all orders. You can use RowFilter for this.
  • A JTable called OrdersTable that displays all orders. Change it every time a new order is added or when a filter is utilized. The table should contain 5 columns: Supplier, Wine, Amount Purchased, Purchased Price, and Paid. The default boolean value for Paid is False. Look into DefaultTableModel to learn how to populate the table with your data.

Examples

Example 1: wine & supplier selection

Wine Merchant app: wine & supplier selection

Example 2: success!

Wine Merchant app: successful wine order

Example 3: the detailed table

Wine Merchant app: the detailed table about orders

Example 4: the filter menu

Wine Merchant app: the filter menu

Example 5: the filter in action

Wine Merchant app: the filter in action, only wine order from Winematic is displayed

Write a program
IDE integration
Checking the IDE status
___

Create a free account to access the full topic