-
Help me to read input
hi
i have a client server program.. i am sending data variable 'msgFromClient' through PrintWriter object as follwoing
pwOut.println(msgFromClient);
in the program.. i am reading 'msgFromClient' from the following two functions. Now i want to trigger the above statement only when user has given his input through one of the following fucntions. i can trigger directly by keeping the statement in both the function. but my statement is outside the both functions and now i want to trigger the statment only when input is given by user ( ie. when user clicks one of the 2 buttons)
Please help me out to solve this situation
private payoff_oneActionPerformed(ActionEvent ae) {
msgFromClient = payoff_one.getText();
payoff_one.setEnabled(false);
payoff_two.setEnabled(false);
game_status.setText("Please wait for your Opponent to Choose");
}
private payoff_twoActionPerformed(ActionEvent ae) {
msgFromClient = payoff_two.getText();
payoff_one.setEnabled(false);
payoff_two.setEnabled(false);
game_status.setText("Please wait for your Opponent to Choose");
}
Similar Threads
-
Replies: 5
Last Post: 05-27-2008, 11:17 AM
-
By svn in forum VB Classic
Replies: 4
Last Post: 08-08-2005, 04:06 PM
-
By AM003295 in forum VB Classic
Replies: 4
Last Post: 06-16-2005, 12:47 AM
-
Replies: 13
Last Post: 04-04-2005, 03:13 AM
-
By mail2vinaybabu in forum Java
Replies: 10
Last Post: 02-27-2005, 01:07 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks