Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Use of publish

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Use of publish

    Good morning
    I would need a hand on understanding what the publish("text") method is for.

    I was reviewing my program in which I manage the conversation between two sockets created by me, and I saw the use of publish() in the various steps of the commands for the exchange of messages between sockets, but I no longer remember its use.
    Even searching the web I couldn't understand its purpose.

    Can someone give me some clarification or a link where I can find the information?
    Thank you.
    Last edited by ZioCrick; October 21st, 2024 at 11:48 AM.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Uso di publish

    Please post your question in English.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Oct 2019
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Uso di publish

    Quote Originally Posted by Norm View Post
    Please post your question in English.
    Sorry.
    I have changed my post.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Use of publish

    What class is the publish() method in? Is there any documentation for it?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Oct 2019
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Use of publish

    It is part of class SwingWorker

    the fact is that I did not find any documentation about it.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Use of publish

    Where are you looking at the API doc for the SwingWorker class? Here is a link to the Java API doc for Java 8:
    https://docs.oracle.com/javase/8/doc...w-summary.html
    Find the SwingWorker class and within it find the publish method.
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Oct 2019
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Use of publish

    Thanks Norm!
    I was searching only with the word publish and i did not found that page.
    Now I have a better understanding of how and when to use it.

Similar Threads

  1. Simple Publish-Subscribe pattern using J2SE
    By rya11111 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 21st, 2013, 06:44 PM
  2. Simple Publish-Subscribe pattern using J2SE
    By rya11111 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 21st, 2013, 04:31 PM
  3. Javascript -publish on facebookwall
    By Nathiya.k in forum Other Programming Languages
    Replies: 1
    Last Post: September 19th, 2011, 10:19 AM