aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Java awt/swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java awt/swing" Watch "Java awt/swing" New topic
Author

Java awt/swing

Pradyumna Sahoo
Greenhorn

Joined: Feb 27, 2013
Posts: 22
There's no error in this program but it's not working. Any one please help. :-)



Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1773
    
    7

Could you please elaborate as to what the desired behavior of this code is, and how its runtime behaviour differs from those expectations?
It would save people the hassle of having to compile and run your code, if they're even willing to go that far.

Edit: If you add e.printStackTrace(); between the curly braces at line 106 you might actually see what's going on.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Pradyumna Sahoo
Greenhorn

Joined: Feb 27, 2013
Posts: 22
it's a simple awt application which connects to the data base to save some data. that's it.
Pradyumna Sahoo
Greenhorn

Joined: Feb 27, 2013
Posts: 22
These are the errors after e.printTrackTrace()
------------------------------------------------------------
Connecting
java.lang.NullPointerException
at user.test.MyApplication.start(MyApplication.java:99)
at user.test.MyApplication.actionPerformed(MyApplication.java:113)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
-----------------------------------------------------------------------------------------------
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
in start() you have this
Connection conn = null;

then a few lines later
PreparedStatement ps = conn.prepareStatement(query);
Pradyumna Sahoo
Greenhorn

Joined: Feb 27, 2013
Posts: 22
Yeah that was pretty lame . thanks for pointing it out.
Live long and prosper....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java awt/swing