diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-15 14:06:57 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-15 14:06:57 +0200 |
commit | f00fd63cd8a4252d85f04359956d5f79036f0eb2 (patch) | |
tree | 7561272fd22e7d1cc844c4f636bd68c5d2527083 /src/com/joshwalters/bookcatalog/AddBook.java | |
parent | 8b12426328b9200acca352dba11263d0f51a3ba7 (diff) | |
download | BookCatalog-working.tar.gz BookCatalog-working.tar.xz |
Add field for defaul note when adding new booksworking
This allows the user to use the note feature to track in which shelf a
book is located without having to manually add the information to each
newly added book.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'src/com/joshwalters/bookcatalog/AddBook.java')
-rw-r--r-- | src/com/joshwalters/bookcatalog/AddBook.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/joshwalters/bookcatalog/AddBook.java b/src/com/joshwalters/bookcatalog/AddBook.java index 05b227c..eab5879 100644 --- a/src/com/joshwalters/bookcatalog/AddBook.java +++ b/src/com/joshwalters/bookcatalog/AddBook.java @@ -48,6 +48,7 @@ class AddBook implements ActionListener { private ISBNLookup bookLookup = null; private BookDatabase bookDatabase = null; private JTable bookCatalogTable = null; + private JTextField notes = null; /** * Get the different objects needed for the class to function. @@ -57,10 +58,11 @@ class AddBook implements ActionListener { * @param bookCatalogTable */ public AddBook(BookDatabase bookDatabase, ISBNLookup bookLookup, - JTable bookCatalogTable) { + JTable bookCatalogTable, JTextField notes) { this.bookDatabase = bookDatabase; this.bookLookup = bookLookup; this.bookCatalogTable = bookCatalogTable; + this.notes = notes; } /** @@ -79,7 +81,7 @@ class AddBook implements ActionListener { .getAuthor(), bookLookup.getDate(), bookLookup .getDescription(), bookLookup.getISBN(), bookLookup .getPrice(), bookLookup.getPublisher(), bookLookup - .getSubject()); + .getSubject(), this.notes.getText()); // Play the beep sound to alert the user that the book was added to // the database. new PlayWavSoundFile("data/sounds/beep.wav").start(); |