diff --git a/build/classes/library/AlbumFieldPattern.class b/build/classes/library/AlbumFieldPattern.class
index 0ed422e..d316e4e 100644
Binary files a/build/classes/library/AlbumFieldPattern.class and b/build/classes/library/AlbumFieldPattern.class differ
diff --git a/build/classes/library/BookFieldPattern$1.class b/build/classes/library/BookFieldPattern$1.class
index 3d993bb..b550c6b 100644
Binary files a/build/classes/library/BookFieldPattern$1.class and b/build/classes/library/BookFieldPattern$1.class differ
diff --git a/build/classes/library/BookFieldPattern$2.class b/build/classes/library/BookFieldPattern$2.class
index 63993b4..d548413 100644
Binary files a/build/classes/library/BookFieldPattern$2.class and b/build/classes/library/BookFieldPattern$2.class differ
diff --git a/build/classes/library/BookFieldPattern$3.class b/build/classes/library/BookFieldPattern$3.class
index d6b2300..f4263f6 100644
Binary files a/build/classes/library/BookFieldPattern$3.class and b/build/classes/library/BookFieldPattern$3.class differ
diff --git a/build/classes/library/BookFieldPattern$4.class b/build/classes/library/BookFieldPattern$4.class
index bc3f9c9..b4ecd7f 100644
Binary files a/build/classes/library/BookFieldPattern$4.class and b/build/classes/library/BookFieldPattern$4.class differ
diff --git a/build/classes/library/BookFieldPattern$5.class b/build/classes/library/BookFieldPattern$5.class
index aaae77b..c1f41ce 100644
Binary files a/build/classes/library/BookFieldPattern$5.class and b/build/classes/library/BookFieldPattern$5.class differ
diff --git a/build/classes/library/BookFieldPattern.class b/build/classes/library/BookFieldPattern.class
index a4efe16..10b07da 100644
Binary files a/build/classes/library/BookFieldPattern.class and b/build/classes/library/BookFieldPattern.class differ
diff --git a/build/classes/library/BookFieldPattern.form b/build/classes/library/BookFieldPattern.form
index e5683ab..9f78550 100644
--- a/build/classes/library/BookFieldPattern.form
+++ b/build/classes/library/BookFieldPattern.form
@@ -1,6 +1,6 @@
-
diff --git a/build/classes/library/MainMenu$1.class b/build/classes/library/MainMenu$1.class
index c313a1e..aa64097 100644
Binary files a/build/classes/library/MainMenu$1.class and b/build/classes/library/MainMenu$1.class differ
diff --git a/build/classes/library/MainMenu$2.class b/build/classes/library/MainMenu$2.class
index 58493e1..c3172e0 100644
Binary files a/build/classes/library/MainMenu$2.class and b/build/classes/library/MainMenu$2.class differ
diff --git a/build/classes/library/MainMenu$3.class b/build/classes/library/MainMenu$3.class
index 5b8544b..9a38161 100644
Binary files a/build/classes/library/MainMenu$3.class and b/build/classes/library/MainMenu$3.class differ
diff --git a/build/classes/library/MainMenu$4.class b/build/classes/library/MainMenu$4.class
index 5384f5b..a734885 100644
Binary files a/build/classes/library/MainMenu$4.class and b/build/classes/library/MainMenu$4.class differ
diff --git a/build/classes/library/MainMenu$5.class b/build/classes/library/MainMenu$5.class
index 22d5694..bf7afd2 100644
Binary files a/build/classes/library/MainMenu$5.class and b/build/classes/library/MainMenu$5.class differ
diff --git a/build/classes/library/MainMenu$6.class b/build/classes/library/MainMenu$6.class
index 53b00f4..ab5f66f 100644
Binary files a/build/classes/library/MainMenu$6.class and b/build/classes/library/MainMenu$6.class differ
diff --git a/build/classes/library/MainMenu$7.class b/build/classes/library/MainMenu$7.class
index 139af87..d5cea61 100644
Binary files a/build/classes/library/MainMenu$7.class and b/build/classes/library/MainMenu$7.class differ
diff --git a/build/classes/library/MainMenu$8.class b/build/classes/library/MainMenu$8.class
index 806178c..289b76a 100644
Binary files a/build/classes/library/MainMenu$8.class and b/build/classes/library/MainMenu$8.class differ
diff --git a/build/classes/library/MainMenu.class b/build/classes/library/MainMenu.class
index 7ead3da..50a281e 100644
Binary files a/build/classes/library/MainMenu.class and b/build/classes/library/MainMenu.class differ
diff --git a/build/classes/library/MainMenu.form b/build/classes/library/MainMenu.form
index 41829cb..5305172 100644
--- a/build/classes/library/MainMenu.form
+++ b/build/classes/library/MainMenu.form
@@ -34,21 +34,29 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
@@ -56,13 +64,17 @@
-
-
-
+
-
-
+
+
+
+
+
+
+
+
@@ -94,26 +106,25 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
-
@@ -124,15 +135,14 @@
-
+
-
@@ -186,6 +196,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -198,34 +219,192 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/build/classes/library/MovieFieldPattern.class b/build/classes/library/MovieFieldPattern.class
index 625e0bb..235bd3c 100644
Binary files a/build/classes/library/MovieFieldPattern.class and b/build/classes/library/MovieFieldPattern.class differ
diff --git a/src/library/AlbumFieldPattern.java b/src/library/AlbumFieldPattern.java
index c1d6869..ab1f746 100644
--- a/src/library/AlbumFieldPattern.java
+++ b/src/library/AlbumFieldPattern.java
@@ -27,7 +27,7 @@ public class AlbumFieldPattern extends javax.swing.JFrame {
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
albumTitle.setInputVerifier(new library.Validation("[a-zA-z0-9]+", required));
}
- public boolean add = false, delete = false, edit = false;
+ public boolean add = false, delete = false, edit = false, search=false;
/**
* This method is called from within the constructor to initialize the form.
diff --git a/src/library/BookFieldPattern.form b/src/library/BookFieldPattern.form
index e5683ab..9f78550 100644
--- a/src/library/BookFieldPattern.form
+++ b/src/library/BookFieldPattern.form
@@ -1,6 +1,6 @@
-
@@ -266,5 +272,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/library/BookFieldPattern.java b/src/library/BookFieldPattern.java
index 940fa97..624ec12 100644
--- a/src/library/BookFieldPattern.java
+++ b/src/library/BookFieldPattern.java
@@ -32,7 +32,7 @@ public class BookFieldPattern extends javax.swing.JFrame {
//bookTitle.setInputVerifier(new library.Validation("[a-zA-z0-9]+", required));
}
- public boolean add = false, delete = false, edit = false;
+ public boolean add = false, delete = false, edit = false, search=false;
/**
* This method is called from within the constructor to initialize the form.
@@ -59,6 +59,7 @@ public class BookFieldPattern extends javax.swing.JFrame {
Category = new javax.swing.JComboBox<>();
mainlabel = new javax.swing.JLabel();
SaveChanges = new javax.swing.JButton();
+ jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
@@ -101,6 +102,15 @@ public class BookFieldPattern extends javax.swing.JFrame {
lISBN.setText("ISBN:");
ISBN.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
+ ISBN.setToolTipText("XXX-X-XXXX-X");
+ ISBN.addFocusListener(new java.awt.event.FocusAdapter() {
+ public void focusGained(java.awt.event.FocusEvent evt) {
+ ISBNFocusGained(evt);
+ }
+ public void focusLost(java.awt.event.FocusEvent evt) {
+ ISBNFocusLost(evt);
+ }
+ });
ISBN.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ISBNActionPerformed(evt);
@@ -129,6 +139,12 @@ public class BookFieldPattern extends javax.swing.JFrame {
}
});
+ jLabel1.setLabelFor(ISBN);
+ jLabel1.setText("XXX-X-XXXX-X");
+ jLabel1.setToolTipText("");
+ jLabel1.setDoubleBuffered(true);
+ jLabel1.setName(""); // NOI18N
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
@@ -160,6 +176,8 @@ public class BookFieldPattern extends javax.swing.JFrame {
.addComponent(ISBN)
.addComponent(Category, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(SaveChanges, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(18, 18, 18)
+ .addComponent(jLabel1)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -194,7 +212,8 @@ public class BookFieldPattern extends javax.swing.JFrame {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lISBN)
- .addComponent(ISBN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(ISBN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lcategory)
@@ -204,6 +223,8 @@ public class BookFieldPattern extends javax.swing.JFrame {
.addContainerGap(33, Short.MAX_VALUE))
);
+ jLabel1.setVisible(false);
+
pack();
}// //GEN-END:initComponents
@@ -242,6 +263,14 @@ public class BookFieldPattern extends javax.swing.JFrame {
// TODO add your handling code here:
}//GEN-LAST:event_ISBNActionPerformed
+ private void ISBNFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ISBNFocusGained
+ jLabel1.setVisible(true);
+ }//GEN-LAST:event_ISBNFocusGained
+
+ private void ISBNFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ISBNFocusLost
+ jLabel1.setVisible(false);
+ }//GEN-LAST:event_ISBNFocusLost
+
/**
* @param args the command line arguments
*/
@@ -289,6 +318,7 @@ public class BookFieldPattern extends javax.swing.JFrame {
private javax.swing.JLabel authorname;
private javax.swing.JLabel authorsurname;
private javax.swing.JTextField bookTitle;
+ private javax.swing.JLabel jLabel1;
private javax.swing.JLabel lISBN;
private javax.swing.JLabel lcategory;
private javax.swing.JLabel lpublishing;
diff --git a/src/library/ListResult.form b/src/library/ListResult.form
index 601a0ff..70d22a7 100644
--- a/src/library/ListResult.form
+++ b/src/library/ListResult.form
@@ -26,15 +26,15 @@
-
+
-
-
+
+
-
+
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/src/library/ListResult.java b/src/library/ListResult.java
index 5ff57ed..7f735fd 100644
--- a/src/library/ListResult.java
+++ b/src/library/ListResult.java
@@ -65,21 +65,21 @@ public class ListResult extends javax.swing.JFrame {
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addGap(390, 390, 390)
+ .addGap(436, 436, 436)
.addComponent(mainlabel, javax.swing.GroupLayout.PREFERRED_SIZE, 289, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1197, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addContainerGap(20, Short.MAX_VALUE))
+ .addGap(23, 23, 23)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1180, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap(26, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(mainlabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 545, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(45, Short.MAX_VALUE))
+ .addGap(13, 13, 13)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 533, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(30, Short.MAX_VALUE))
);
pack();
diff --git a/src/library/MainMenu.form b/src/library/MainMenu.form
index 41829cb..5305172 100644
--- a/src/library/MainMenu.form
+++ b/src/library/MainMenu.form
@@ -34,21 +34,29 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
@@ -56,13 +64,17 @@
-
-
-
+
-
-
+
+
+
+
+
+
+
+
@@ -94,26 +106,25 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
-
@@ -124,15 +135,14 @@
-
+
-
@@ -186,6 +196,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -198,34 +219,192 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/src/library/MainMenu.java b/src/library/MainMenu.java
index 0a44708..5146129 100644
--- a/src/library/MainMenu.java
+++ b/src/library/MainMenu.java
@@ -40,10 +40,23 @@ public class MainMenu extends javax.swing.JFrame {
bBook = new javax.swing.JButton();
radioBAdd = new javax.swing.JRadioButton();
radioBEdit = new javax.swing.JRadioButton();
- radioBSearch = new javax.swing.JRadioButton();
- bUser = new javax.swing.JButton();
radioBDelete1 = new javax.swing.JRadioButton();
+ radioBSearch = new javax.swing.JRadioButton();
+ jPanel1 = new javax.swing.JPanel();
+ allMovieShow = new javax.swing.JButton();
+ allAlbumsShow1 = new javax.swing.JButton();
allBooksShow = new javax.swing.JButton();
+ newestBook = new javax.swing.JButton();
+ newestMovie = new javax.swing.JButton();
+ newestAlbum = new javax.swing.JButton();
+ newestBook1 = new javax.swing.JButton();
+ newestMovie1 = new javax.swing.JButton();
+ newestAlbum1 = new javax.swing.JButton();
+ jPanel2 = new javax.swing.JPanel();
+ jLabel2 = new javax.swing.JLabel();
+ jLabel3 = new javax.swing.JLabel();
+ jLabel4 = new javax.swing.JLabel();
+ jToggleButton1 = new javax.swing.JToggleButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
@@ -90,6 +103,14 @@ public class MainMenu extends javax.swing.JFrame {
}
});
+ mode.add(radioBDelete1);
+ radioBDelete1.setText("Usuwanie");
+ radioBDelete1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ radioBDelete1ActionPerformed(evt);
+ }
+ });
+
mode.add(radioBSearch);
radioBSearch.setSelected(true);
radioBSearch.setText("Wyszukiwarka");
@@ -99,21 +120,6 @@ public class MainMenu extends javax.swing.JFrame {
}
});
- bUser.setText("Czytelnika...");
- bUser.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- bUserActionPerformed(evt);
- }
- });
-
- mode.add(radioBDelete1);
- radioBDelete1.setText("Usuwanie");
- radioBDelete1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- radioBDelete1ActionPerformed(evt);
- }
- });
-
javax.swing.GroupLayout searchButtonsPanelLayout = new javax.swing.GroupLayout(searchButtonsPanel);
searchButtonsPanel.setLayout(searchButtonsPanelLayout);
searchButtonsPanelLayout.setHorizontalGroup(
@@ -121,23 +127,22 @@ public class MainMenu extends javax.swing.JFrame {
.addGroup(searchButtonsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(searchButtonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(searchButtonsPanelLayout.createSequentialGroup()
- .addComponent(radioBAdd)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(radioBEdit)
- .addGap(7, 7, 7)
- .addComponent(radioBDelete1)
- .addGap(39, 39, 39)
- .addComponent(radioBSearch))
.addGroup(searchButtonsPanelLayout.createSequentialGroup()
.addComponent(bBook)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bMovie)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bAlbum)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGroup(searchButtonsPanelLayout.createSequentialGroup()
+ .addComponent(radioBSearch)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)
+ .addComponent(radioBAdd)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(bUser)))
- .addContainerGap(111, Short.MAX_VALUE))
+ .addComponent(radioBEdit)
+ .addGap(18, 18, 18)
+ .addComponent(radioBDelete1)
+ .addGap(78, 78, 78))))
);
searchButtonsPanelLayout.setVerticalGroup(
searchButtonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -146,17 +151,32 @@ public class MainMenu extends javax.swing.JFrame {
.addGroup(searchButtonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(radioBAdd)
.addComponent(radioBEdit)
- .addComponent(radioBSearch)
- .addComponent(radioBDelete1))
+ .addComponent(radioBDelete1)
+ .addComponent(radioBSearch))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(searchButtonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(bBook)
.addComponent(bMovie)
- .addComponent(bAlbum)
- .addComponent(bUser))
+ .addComponent(bAlbum))
.addGap(83, 83, 83))
);
+ jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+
+ allMovieShow.setText("Wszystkie filmy");
+ allMovieShow.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ allMovieShowActionPerformed(evt);
+ }
+ });
+
+ allAlbumsShow1.setText("Wszyskie albumy");
+ allAlbumsShow1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ allAlbumsShow1ActionPerformed(evt);
+ }
+ });
+
allBooksShow.setText("Wszyskie książki");
allBooksShow.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -164,6 +184,100 @@ public class MainMenu extends javax.swing.JFrame {
}
});
+ newestBook.setText("Najnowsza książka");
+
+ newestMovie.setText("Najnowszy film");
+
+ newestAlbum.setText("Najnowszy album");
+
+ newestBook1.setText("Najnowsza książka");
+
+ newestMovie1.setText("Najnowszy film");
+
+ newestAlbum1.setText("Najnowszy album");
+
+ javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+ jPanel1.setLayout(jPanel1Layout);
+ jPanel1Layout.setHorizontalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(allAlbumsShow1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(allMovieShow, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(allBooksShow, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addGap(31, 31, 31)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+ .addComponent(newestMovie, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(newestBook, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(newestAlbum, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(34, 34, 34)
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+ .addComponent(newestMovie1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(newestBook1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(newestAlbum1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(67, Short.MAX_VALUE))
+ );
+ jPanel1Layout.setVerticalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(newestBook1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(newestMovie1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(newestAlbum1))
+ .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(newestBook)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(newestMovie)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(newestAlbum))
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addComponent(allBooksShow)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(allAlbumsShow1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(allMovieShow))))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
+
+ jLabel2.setText("Ilość albumów:");
+
+ jLabel3.setText("Ilość książek:");
+
+ jLabel4.setText("Ilość filmów:");
+
+ javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
+ jPanel2.setLayout(jPanel2Layout);
+ jPanel2Layout.setHorizontalGroup(
+ jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel2Layout.createSequentialGroup()
+ .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGap(0, 66, Short.MAX_VALUE))
+ );
+ jPanel2Layout.setVerticalGroup(
+ jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabel2)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabel3)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabel4)
+ .addContainerGap(25, Short.MAX_VALUE))
+ );
+
+ jToggleButton1.setText("Własne zapytanie SELECT");
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
@@ -174,29 +288,38 @@ public class MainMenu extends javax.swing.JFrame {
.addContainerGap()
.addComponent(programTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
- .addGap(359, 359, 359)
- .addComponent(jLabel1)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGap(359, 359, 359)
+ .addComponent(jLabel1))
+ .addGroup(layout.createSequentialGroup()
+ .addGap(26, 26, 26)
+ .addComponent(searchButtonsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(layout.createSequentialGroup()
+ .addGap(19, 19, 19)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jToggleButton1))))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
- .addGroup(layout.createSequentialGroup()
- .addGap(26, 26, 26)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(allBooksShow)
- .addComponent(searchButtonsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(21, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(24, 24, 24)
.addComponent(programTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGap(13, 13, 13)
.addComponent(searchButtonsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(allBooksShow)
- .addGap(0, 250, Short.MAX_VALUE))
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jToggleButton1)
+ .addContainerGap(50, Short.MAX_VALUE))
);
pack();
@@ -239,10 +362,6 @@ public class MainMenu extends javax.swing.JFrame {
}
}//GEN-LAST:event_bAlbumActionPerformed
- private void bUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bUserActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_bUserActionPerformed
-
private void radioBEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioBEditActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_radioBEditActionPerformed
@@ -269,7 +388,7 @@ public class MainMenu extends javax.swing.JFrame {
if (radioBSearch.getModel().isSelected()) {
BookFieldPattern b = new BookFieldPattern();
b.setVisible(true);
- b.delete = true;
+ b.search = true;
}
}//GEN-LAST:event_bBookActionPerformed
@@ -297,9 +416,18 @@ public class MainMenu extends javax.swing.JFrame {
"Wydawnictwo",
"Kategoria"};
ListResult table = new ListResult(data, columnNames);
+
table.setVisible(true);
}//GEN-LAST:event_allBooksShowActionPerformed
+ private void allMovieShowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allMovieShowActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_allMovieShowActionPerformed
+
+ private void allAlbumsShow1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allAlbumsShow1ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_allAlbumsShow1ActionPerformed
+
/**
* @param args the command line arguments
*/
@@ -335,13 +463,26 @@ public class MainMenu extends javax.swing.JFrame {
}
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton allAlbumsShow1;
private javax.swing.JButton allBooksShow;
+ private javax.swing.JButton allMovieShow;
private javax.swing.JButton bAlbum;
private javax.swing.JButton bBook;
private javax.swing.JButton bMovie;
- private javax.swing.JButton bUser;
private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JLabel jLabel4;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JToggleButton jToggleButton1;
private javax.swing.ButtonGroup mode;
+ private javax.swing.JButton newestAlbum;
+ private javax.swing.JButton newestAlbum1;
+ private javax.swing.JButton newestBook;
+ private javax.swing.JButton newestBook1;
+ private javax.swing.JButton newestMovie;
+ private javax.swing.JButton newestMovie1;
private javax.swing.JLabel programTitle;
private javax.swing.JRadioButton radioBAdd;
private javax.swing.JRadioButton radioBDelete1;
diff --git a/src/library/MovieFieldPattern.java b/src/library/MovieFieldPattern.java
index 727b77b..5391f21 100644
--- a/src/library/MovieFieldPattern.java
+++ b/src/library/MovieFieldPattern.java
@@ -27,7 +27,7 @@ public class MovieFieldPattern extends javax.swing.JFrame {
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
movieTitle.setInputVerifier(new library.Validation("[a-zA-z0-9]+", required));
}
- public boolean add = false, delete = false, edit = false;
+ public boolean add = false, delete = false, edit = false, search=false;
/**
* This method is called from within the constructor to initialize the form.