private synchronized void doShowBackoffice() { BackOfficeWindow window = BackOfficeWindow.getInstance(); if (window == null) { window = new BackOfficeWindow(); Application.getInstance().setBackOfficeWindow(window); } window.setVisible(true); window.toFront(); }
private synchronized void doShowSalesReport() { BackOfficeWindow window = BackOfficeWindow.getInstance(); JTabbedPane tabbedPane = window.getTabbedPane(); ReportViewer viewer = null; // int index = tabbedPane.indexOfTab(com.floreantpos.POSConstants.SALES_REPORT); int index = tabbedPane.indexOfTab("Transaksi Harian"); if (index == -1) { // viewer = new ReportViewer(new SalesReport()); viewer = new ReportViewer(new DailyTxnReport()); // tabbedPane.addTab(POSConstants.SALES_REPORT, viewer); tabbedPane.addTab("Transaksi Harian", viewer); } else { viewer = (ReportViewer) tabbedPane.getComponentAt(index); } tabbedPane.setSelectedComponent(viewer); window.setVisible(true); }