Skip to content

Commit

Permalink
Create checkbox in AddExpenseV.
Browse files Browse the repository at this point in the history
  • Loading branch information
YinLingithub committed Aug 6, 2023
1 parent 0e18c77 commit 5de0b45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/main/java/views/add_edit_epense_views/AddExpenseV.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ public class AddExpenseV extends Component implements ActionListener, LoadMonthM
* @param currSession SessionStorage the current working session.
*/
public AddExpenseV(MonthMenuV monthMenu, ExpenseC controller, String[] existingCategory, int monthID, SessionStorage currSession) {
this.monthMenu = monthMenu;
this.nameInput = new JTextField(15);
this.valueInput = new JTextField(15);
this.categoryCombo = new JComboBox<>(existingCategory); // category list

this.controller = controller;
this.monthID = monthID;
this.currSession = currSession;
this.selectedExpense = null;

this.monthMenu = monthMenu;
this.nameInput = new JTextField(15);
this.valueInput = new JTextField(15);
this.categoryCombo = new JComboBox<>(existingCategory); // category list
this.isRecurringCheckBox = new JCheckBox("Is recurring expense");
}

/**
Expand All @@ -68,7 +69,7 @@ public void openAddExpense(){
panell.setLayout(new GridLayout(0, 1));

frame.add(panel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
frame.setTitle("Add New Expense");
frame.setSize(300, 500);
panel.add(nameLabel, BorderLayout.WEST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public EditExpenseV(MonthMenuV monthMenu, ExpenseC controller, String[] existing
this.nameInput = new JTextField(15);
this.valueInput = new JTextField(15);
this.categoryCombo = new JComboBox<>(existingCategory);
this.isRecurringCheckBox = new JCheckBox("This is a recurring expense.");
this.isRecurringCheckBox = new JCheckBox("Is recurring expense");
}

/**
Expand Down

0 comments on commit 5de0b45

Please sign in to comment.