Homework 4 Task 3 - rebing/POS GitHub Wiki

1. Name at least one method, where a breakpoint will stop the application execution right after pressing the "New purchase" button.

PurchaseTab.newPurchaseButtonClicked() line: 152 PurchaseTab$1.actionPerformed(ActionEvent) line: 107 JButton(AbstractButton).fireActionPerformed(ActionEvent) line: 2018 AbstractButton$Handler.actionPerformed(ActionEvent) line: 2341 DefaultButtonModel.fireActionPerformed(ActionEvent) line: 402 DefaultButtonModel.setPressed(boolean) line: 259 BasicButtonListener.mouseReleased(MouseEvent) line: 252 ...

2. Name a method, where a breakpoint will stop the application execution right after pressing the "Confirm" button (during confirming the order).

PurchaseTab.submitPurchaseButtonClicked() line: 177

3. List the subclasses of the java.awt.Container class, which regularly call doLayout() method (if you randomly use the application, Hint: put the breakpoint to the method Container#doLayout())

JTextField JTappedPane JPanel PurchaseItemPanel JFrame JRootPane JLayeredPane ConfirmationPanel JLabel JTextField JButton JtabbedPane JScrollPane JViewport JTable

4. How many times the constructor new String() (without argument) in the class java.lang.String is used after pressing the New purchase button.

0

5. How many times the constructor new JPanel() (without argument) in the class javax.swing.JPanel is used after pressing the New purchase button.

0

Note: Panin method breakpointi vastavatele konstruktoritele külge, aga New purchase-ga ei tulnud ühtegi. Confirm nupuga tuli mõni JPanel().