JamesBranam's Blog

Friday Oct 26, 2007

Communication Between JFrame Panels

Hi all,

We've had some interesting contributions to the NetBeans Community Docs wiki this past week. One of them comes from Joseph Cotton: Communication Between JFrame Panels. This Tips & Tricks entry shows you how to make communication possible between two JFrame panels. For example, pushing the button on panel B and have a message placed in the text box in panel A, (and visa versa).

Be sure to check this out. I'm certain that you'll like what you see. When do we get to see YOUR contribution?

--James

Comments:

I think a better way to do this would be to have a listener on A that can listen to events dispatched by B. That way, if you have "two" B frames open you are not stepping on your frame's references. Sending a message on the EDT in this case is probably not a big deal, although using an EventBus -- see eventbus.dev.java.net, would be more effective.

Posted by Jason Drake on October 27, 2007 at 10:01 AM CEST #

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Observable.html

Posted by Srdjan on October 28, 2007 at 02:13 AM CET #

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers