Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void checkInsert() {
- Object temp[] = new Object[18];
- int p=0;
- if (textField_6.getText() == "") {
- JTextField ISBN = new JTextField();
- temp[p]="ISBN:";
- p++;
- temp[p]=ISBN;
- p++;
- }
- if (textField_7.getText() == "") {
- JTextField title = new JTextField();
- temp[p]="Title:";
- p++;
- temp[p]=title;
- p++;
- }
- if (textField_8.getText() == "") {
- JTextField Publisher = new JTextField();
- temp[p]="Publisher:";
- p++;
- temp[p]=Publisher;
- p++;
- }
- if (textField_8.getText() == "") {
- JTextField year = new JTextField();
- temp[p]="Year:";
- p++;
- temp[p]=year;
- p++;
- }
- if (textField_9.getText() == "") {
- JTextField ISBN = new JTextField();
- temp[p]="ISBN:";
- p++;
- temp[p]=ISBN;
- p++;
- }
- if (textField_10.getText() == "") {
- JTextField price = new JTextField();
- temp[p]="Price:";
- p++;
- temp[p]=price;
- p++;
- }
- if (textField_11.getText() == "") {
- JTextField catg = new JTextField();
- temp[p]="Category:";
- p++;
- temp[p]=catg;
- p++;
- }
- if (textField_12.getText() == "") {
- JTextField copy = new JTextField();
- temp[p]="Copies:";
- p++;
- temp[p]=copy;
- p++;
- }
- if (textField_5.getText() == "") {
- JTextField threshold = new JTextField();
- temp[p]="Theshold:";
- p++;
- temp[p]=threshold;
- p++;
- }
- Object msg[] = new Object[p];
- for (int i = 0; i < msg.length; i++) {
- msg[i]=temp[i];
- }
- int option = JOptionPane.showConfirmDialog(null, msg,
- "Publisher", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement