AppAccelerator<tm>1.2.010 for Java <JDK 1.2> *86 version
Copyright <c> 1997-1999 Inprise Corporation All Rights Reserved
Exception in thread "main" java.lang.NullPointerException
at Database.<init><Database.java:161>
at Database.main<Database.java:63>
About serial version UID: leave that till last; don't do anything about that warning until you have finished everything else.1. WARNING in DBRx.java (at line 7)
import javax.swing.JButton;
^^^^^^^^^^^^^^^^^^^
The import javax.swing.JButton is never used
----------
2. WARNING in DBRx.java (at line 8)
import java.awt.event.ActionListener;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import java.awt.event.ActionListener is never used
----------
3. WARNING in DBRx.java (at line 9)
import java.awt.event.ActionEvent;
^^^^^^^^^^^^^^^^^^^^^^^^^^
The import java.awt.event.ActionEvent is never used
----------
4. WARNING in DBRx.java (at line 10)
import javax.swing.BoxLayout;
^^^^^^^^^^^^^^^^^^^^^
The import javax.swing.BoxLayout is never used
----------
5. WARNING in DBRx.java (at line 15)
import java.io.DataInputStream;
^^^^^^^^^^^^^^^^^^^^^^^
The import java.io.DataInputStream is never used
----------
6. WARNING in DBRx.java (at line 16)
import java.io.DataOutputStream;
^^^^^^^^^^^^^^^^^^^^^^^^
The import java.io.DataOutputStream is never used
----------
7. WARNING in DBRx.java (at line 17)
import java.io.FileOutputStream;
^^^^^^^^^^^^^^^^^^^^^^^^
The import java.io.FileOutputStream is never used
----------
8. WARNING in DBRx.java (at line 18)
import java.io.FileInputStream;
^^^^^^^^^^^^^^^^^^^^^^^
The import java.io.FileInputStream is never used
----------
9. WARNING in DBRx.java (at line 19)
import java.io.PrintStream;
^^^^^^^^^^^^^^^^^^^
The import java.io.PrintStream is never used
----------
10. WARNING in DBRx.java (at line 20)
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
The import java.io.IOException is never used
----------
11. WARNING in DBRx.java (at line 22)
public class DBRx extends JFrame
^^^^
The serializable class DBRx does not declare a static final serialVersionUID field of type long
----------
12. WARNING in DBRx.java (at line 31)
private JLabel label1;
^^^^^^
The field DBRx.label1 is never read locally
----------
13. WARNING in DBRx.java (at line 32)
private JPanel panel1;
^^^^^^
The field DBRx.panel1 is never read locally
----------
14. WARNING in DBRx.java (at line 65)
private int count;
^^^^^
The field DBRx.count is never read locally
----------
15. WARNING in DBRx.java (at line 97)
JLabel label1=new JLabel();
^^^^^^
The local variable label1 is never read
----------
16. WARNING in DBRx.java (at line 166)
vertical1.add(vertical1.createVerticalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createVerticalStrut(int) from the type Box should be accessed in a static way
----------
17. WARNING in DBRx.java (at line 173)
vertical2.add(vertical2.createVerticalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createVerticalStrut(int) from the type Box should be accessed in a static way
----------
18. WARNING in DBRx.java (at line 180)
vertical3.add(vertical3.createHorizontalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createHorizontalStrut(int) from the type Box should be accessed in a static way
----------
19. WARNING in DBRx.java (at line 187)
vertical4.add(vertical4.createHorizontalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createHorizontalStrut(int) from the type Box should be accessed in a static way
----------
20. WARNING in DBRx.java (at line 194)
vertical5.add(vertical5.createHorizontalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createHorizontalStrut(int) from the type Box should be accessed in a static way
----------
21. WARNING in DBRx.java (at line 201)
vertical6.add(vertical6.createHorizontalStrut(25));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The static method createHorizontalStrut(int) from the type Box should be accessed in a static way
----------
21 problems (21 warnings)[Campbell@dhcppc0 disk-1]$ java DBRx
if (event.getActionCommand() = saveButton)
/* RIGHT HERE I WANT TO CODE IT IN SUCH A WAY THAT THE SAVE BUTTON AUTOMATICALLY
ENABLES SAVING OF THE DATA TO THE FILE. HOW DO I CHECK TO ENSURE THAT ALL FIELDS
REQUIRING TEXT INPUTS ARE COMPLETED BEFORE SUCCESSFULLY CARRYING OUT THE SAVE?*/
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |