Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4575526
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:04:35+00:00 2026-05-21T20:04:35+00:00

I want to know that is it possible to send major Swing classes event/actionlisteners,

  • 0

I want to know that is it possible to send major Swing classes event/actionlisteners, Events, components via RMI.

Possible scenario: If one client press the button or move the slider every client’s button or slider move etc same for other swing elements.

I am expecting the answer in the context of RMI and swing MVC architecture, i want to call the swing component’s models e.g ButtonModel and want to send swing ActionEvent on wire and register PropertyChangeListener/PropertyChangeSupport as remote objects for getting updates at client site.

typical examples :
the server should call this method for each client, when ever some change occur in model

 public void propertyChange(PropertyChangeEvent evt) {
        for (AbstractViewPanel view: registeredViews) {
            view.modelPropertyChange(evt);
        }
    }

in case of an event on one client, each client actionPerformed should be called from server:

@Override
public void actionPerformed(ActionEvent e)  {
}

is it feasible? if not then why? where i could face the problems, i mean which classes are transferable (serialized) and which are not…

EDIT: here you see i m invoking Java Swing defaultbuttonmodel remotely, the only thing left when some of it’s property or method change the other client’s get updates, best would be following swing propertychangelistener if someone can just help me, realizing this, it would be great:

public class RemoteButtonModel extends UnicastRemoteObject implements Model {

    private ButtonModel model = new DefaultButtonModel() ;

    protected myModel() throws RemoteException {
        super();
    }


    @Override
    public void setEnabled(boolean b) throws RemoteException {
        if (isEnabled())
            model.setEnabled(false);
        else{
            model.setEnabled(true);   
           }
    }

    @Override
    public boolean isEnabled() throws RemoteException {
        return model.isEnabled();

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:04:35+00:00Added an answer on May 21, 2026 at 8:04 pm

    The Javadoc for every Swing class says that it should not be serialized.

    More probably you should be transmitting the associated Model classes.

    And event listening via RMI is an anti-pattern. Too much traffic, too many points of failure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey i dont know if that is possible but i want to set a
I want to know that can mouse click event detects colors or even strings.
I just want to know that is it possible to communicate two different apps
I want to know that how voice recognition in android works? Which library it
i want to know that when we want to use push notification service.From where
I want to know that does apple's Push Notification Server generate new device token
I want to know that how can I add help support to my winform
i want to know that why do we add an app.config file in c#
I want to know that what will happen to my activity incase of an
I want to know that Filename1, provided by the user is the same as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.