simranjit singh

Greenhorn
+ Follow
since Mar 01, 2007
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 simranjit singh

jTextArea is defined / initialized when initcomponents() method in clientRMIImpl is called. i am developing my project in netbeans 5.5, jdk 1.6

initcomponents i guess you can see in the clientRMIImpl.java code in the code above..

what can i do to pass a reference of that window to this jtextArea when i get that reply from server?
System.out.print just above is working just fine.
16 years ago


used this.. again the null pointer exception.. i cannot figure out where i am going wrong..


this jtextArea is giving error


Stacktrace :


problem of getting that message on server window has been solved.. thanks alot..
will be glad if this nullpointer can also be removed..
16 years ago
i can not figure out how to do that...

i tried but i landed up writing my output message on server sides cmd prompt(that according to me should have been printed on client sides cmd prmpt) and if i try putting up my that message in my client sides window,(textarea) it gives me nullpointer and for this i know why since it could not find a reference to that client window in which it should print.

server code:


server Interface:


client:


client interface file:


login file m using:



will be glad if you people can tellme where i am going wrong or what i can do to correct my code..

thanks
17 years ago
my client is able to use functions stored in server thru rmi.. but i am not able to make calls from server to client.. will be glad if anyone can explain this with an easy example

thnx..
17 years ago
this i also know..
if i wz able to find the error, why wud i post it here..
i dont know why is it giving error, according to me code is fine..

[ March 02, 2007: Message edited by: simranjit singh ]

[Andrew: removed swearing.]
[ March 02, 2007: Message edited by: Andrew Monkhouse ]
17 years ago
this above is the stack trace as requested..
the problem is the code for the jtextfield is all self generated by netbeans ide and i am not able to find out why it is showing me nullpointer
17 years ago
java.lang.NullPointerException
at chat.Client.jButton1ActionPerformed(Client.java:131)
at chat.Client.access$000(Client.java:20)
at chat.Client$1.actionPerformed(Client.java:73)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
17 years ago
i am developing a code from headfirst java book from orielly on netbeans..

since d code is huge i cannot type it or copy it here.. so i hv uploaded it on d site..

megaupload
try compiling server.java, login.java, client.java
and running server.java n login.java
d problem i am having is when i try sending message from client d printwriter or my textfiled gives a nullpointer exception.. i hv tried a lot debugging to find wat might b probling but cannot find it..
i will b glad if somebody spends his/her time telling wat d prob is.. i m kinda newbie for java..

netbeans m using is 5.5 n jdk1.6
17 years ago