khushi garg

Greenhorn
+ Follow
since Jul 19, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by khushi garg

I made some changes in the code but still unable to make out how to add label to the frame. Please help me
13 years ago
my complete code is:

13 years ago
error that is occuring after selecting file from JFilechooser


c:\javac ImageEditor.java

c:\java ImageEditor
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at OpenDialog.<init>(ImageEditor.java:26)
at MenuHandler.actionPerformed(ImageEditor.java:163)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:20
13)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2336)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:405)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:260
)
at javax.swing.AbstractButton.doClick(AbstractButton.java:375)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
238)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMen
uItemUI.java:1282)
at java.awt.Component.processMouseEvent(Component.java:6100)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3288)
at java.awt.Component.processEvent(Component.java:5865)
at java.awt.Container.processEvent(Container.java:2099)
at java.awt.Component.dispatchEventImpl(Component.java:4461)
at java.awt.Container.dispatchEventImpl(Container.java:2157)
at java.awt.Component.dispatchEvent(Component.java:4287)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4455
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4119)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4049)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2555)
at java.awt.Component.dispatchEvent(Component.java:4287)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:276)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:191)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)


13 years ago
Here is my code. I want to display an image chosen by Jfilechooser on the content pane of the frame. Since i have designed frame in different class, i am enable to add image panel to the cintent pane. i have tried below code, but it is showing null pointer exception. Can anybody help me to know where is the error in the code & what should i do to make its working correct?
13 years ago