This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Accessing Socket in actionPerformed function Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Accessing Socket in actionPerformed function" Watch "Accessing Socket in actionPerformed function" New topic
Author

Accessing Socket in actionPerformed function

Realm Head
Greenhorn

Joined: Dec 29, 2012
Posts: 1

I have a Main class that creates the Socket object, and a UserLogin class that has a GUI to get some text as input.
My problem is that I am not able to access the same Socket object within the actionPerformed function of UserLogin.
I mean s.isClosed() returns TRUE within submitActionPerformed(ActionEvent ae)

I tried to solve it by making it final... but didn't work.



 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Accessing Socket in actionPerformed function
 
Similar Threads
how to write the data from text fields of my swing application to an xml file dynamically?
why its not running or how to run it
Help with Chat software
Learning NetBeans JavaForms
Networked Programs that work across countries