hi guy i would like help or info about socket

little exemple of code:

clientSocket = new Socket(ip, 6784);
BufferedReader insideServer = new BufferedReader(
new InputStreamReader(clientSocket.getInputStream()));

its that possible from the inputStream getting the click event ?

example a user click from a button and another user using same application
on another computer receive data from that button.

it's hard how to explain what i am looking for but
i extends a new jbutton and redefine with new parameter and i want to get those value when that person click.

this my new button i want the x y

class MyButton extends JButton implements ActionListener {   
       int x, y;

   MyButton(String text, int x, int y) {
      this.x = x;
      this.y = y;

   public void ActionPerform(ActionEvent e) {

5 Years
Discussion Span
Last Post by radhakrishna.p

i understood what you are looking for i.e you need a form which sends and receives a data using socket programing

is this right?

we can do this thing by using Socket class (for sending data) and ServerSocket class (for receiving data)

but i have some doubts in your post

its that possible from the inputStream getting the click event

i couldn't understand what you are asking in the above line can you clarify this?

and in the given Mybutton Class you have taken x,y parameters

can you tell me the use of those variables?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.