Automatic updating of custom graphical components in Netbeans graphical designer

I am designing some custom graphical components using Netbeans 7.4. I am making some smaller components that combine to make larger custom components. However, when I change one of the bottom-level components, the changes do not propagate up to other elements.

Is there any way to insert a custom component so that changes to it's base percolate to all the instances? Somewhat new to fiddling with Swing, so my apologies if this is a trivial thing.

I have already added them to a custom palette hoping that would do something, but alas to no avail.

Answers


The NetBeans GUI designer doesn't support this directly, but you can instantiate your own custom components as often as desired. The key is designing for reuse. I try to follow the Swing separable model architecture, even if there's no need for a custom look & feel.

Edit: I added two instances of NewJPanel to Main like in this example. When I changed the label's text in the designer, it changed in both panels at runtime.

f.setLayout(new GridLayout(0, 1));
f.add(new NewJPanel());
f.add(new NewJPanel());

Need Your Help

MS Access Form Load

ms-access vba access-vba ms-access-2003

I have a form with two combo boxes and couple of buttons. One of the buttons (called "Roll Over") is for rolling over data from the previous year. When clicked it should be able to grab the data fr...

How to replace jcarousel slider html using ajax call in php MVC framework

php jquery json

I have two jcarousel slider in my php web application, one is for selecting month and another is for dates related to that month, i want to do it using jquery ajax,