Skip to main content

Matisse and inheritance (Netbeans 5)

2 replies [Last post]
Joined: 2004-08-12

Hi, everybody. I've been playing with Netbeans 5 and Matisse for a little while. Recently I tried to build a UI infrastructure for a project of mine. I wanted to build a "root" panel (CrudUI, subclass of JPanel) and other panels would be subclasses of this panel.

I didn't find a simple way to create a panel that extends a custom panel and still be able to use Matisse to lay out the UI components. Does anyone already had similar problems? Another request, I'd like to read a tutorial that fully describes Matisse and its features. Could you suggest any tutorial or even a book, please?

Thanks in advance,

Matheus Eduardo.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-12-24

Hi Eduardo,

I have some advise for you: stay away from Matisse and NetBeans 5. It all works well if you create screens like described in the NetBeans tutorials, but if you want to use inheritance and create your own components, at some time or another things will go terribly wrong.
There are workarounds for most of the limitations that NetBeans has. Like in your case, it is possible to choose from your package menu -> new File/Folder -> JavaGui forms -> JPanel form
You'll end up with something that extends a JForm, but then you can change the type it extends into whatever you want. Close your IDE, restart, and it should be OK.
However, keep in mind that the code Matisse generates when you drop in new elements will not be refactored when you make changes to the components you put there.
I have 5 months of NetBeans/Matisse experience now, and still I get unpleasant surprises, when I realise that NetBeans wasn't designed to do a certain thing and I find it almost impossible to accomplish it by adding my own code.

My advise: look for another framework.

Joined: 2004-09-02

One can divide UI designs into individual panels and mix and match them, that can be easily done with Matisse.

Inheritance would be a problem - simply because I cannot see (intuitively) how that is going to work out with the Form Designer for a start.

What exactly are you seeking a solution for? There might be a (better) workaround for your issue, you know...