@@ -0,0 +1,2693 @@
+%0Apackage InventoryPK;%0A%0Aimport java.awt.BorderLayout;%0Aimport java.sql.*;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0Aimport javax.swing.JButton;%0Aimport javax.swing.JPanel;%0Aimport javax.swing.JScrollPane;%0Aimport javax.swing.JTable;%0Aimport javax.swing.table.DefaultTableModel;%0A%0Apublic class Sales %7B%0A    %0A    static Connection conn;%0A    static JButton btnRefresh;%0A    %0A    static Object%5B%5D%5B%5D dataResult;%0A%09static Object%5B%5D columns = %7B%22Debit%22, %22Credit%22%7D;%0A%09static DefaultTableModel dTableModel =%0A                new DefaultTableModel(dataResult, columns) %7B%0A%09%09public Class getColumnClass(int column)%7B%0A%09%09%09Class returnValue;%0A%09%09%09%0A%09%09%09if((column %3E= 0) && (column %3C getColumnCount())) %0A%09%09%09%09returnValue = getValueAt(0, column).getClass();%0A%09%09%09else %0A%09%09%09%09returnValue = Object.class;%0A%09%09%09return returnValue;%0A%09%09%7D%0A%09%09public boolean isCellEditable(int row, int column) %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D;%0A        %0A        static JTable salesTable;%0A    %0A    public static JScrollPane sales() %7B%0A        JPanel btnPanel = new JPanel (new BorderLayout());%0A        btnRefresh = new JButton(%22Refresh%22);%0A        btnPanel .add(btnRefresh, BorderLayout.EAST);%0A        %0A        salesTable = new JTable(dTableModel);%0A        salesTable.setRowHeight(salesTable.getRowHeight() + 16);%0A        JScrollPane salesTableSP = new JScrollPane(salesTable);%0A           %0A        //loadData();%0A        %0A        JPanel mainPanel = new JPanel(new BorderLayout());%0A        mainPanel.add(salesTableSP, BorderLayout.CENTER);%0A        mainPanel.add(btnPanel, BorderLayout.SOUTH);%0A        %0A        JScrollPane mainPanelSP = new JScrollPane(mainPanel);%0A        %0A        return mainPanelSP;%0A        %0A    %7D%0A    %0A    public static void loadData() %7B%0A         try %7B%0A             Class.forName(%22com.mysql.jdbc.Driver%22);%0A             %0A             String username = LogIn.username;%0A             String password = LogIn.password;%0A             String url = %22jdbc:mysql://%22 + LogIn.ip + %22/inventory%22;%0A             conn = DriverManager.getConnection(url, username, password);%0A             Statement stmt = conn.createStatement();%0A             String selectStuff =%22SELECT * FROM sales;%22;%0A             ResultSet rset = stmt.executeQuery(selectStuff);%0A             %0A             Object%5B%5D tempRow;%0A             while(rset.next()) %7B%0A                 tempRow = new Object%5B%5D%7Brset.getDouble(1), rset.getDouble(2)%7D;%0A                 dTableModel.addRow(tempRow);%0A             %7D%0A             %0A             rset.close();%0A             stmt.close();%0A             conn.close();%0A               %0A         %7D catch (SQLException ex) %7B%0A             ex.printStackTrace();%0A         %7D catch (ClassNotFoundException ex) %7B%0A             ex.printStackTrace();%0A         %7D%0A    %7D%0A%7D%0A

Create Sales.java