GUI builder for Java bean?

L

Lionel

Does anyone know if there is a gui builder or something that can take a
Java bean that I have designed and create a simple gui for creating and
editing instances of that bean?

Thanks

Lionel.
 
A

Arved Sandstrom

Does anyone know if there is a gui builder or something that can take a
Java bean that I have designed and create a simple gui for creating and
editing instances of that bean?

Thanks

Lionel.

All of the major IDEs offer support for doing this.

AHS
 
N

none

Arved said:
All of the major IDEs offer support for doing this.

Hmmmm, I've been trying to get it to work in Netbeans, but it makes
little sense to me. I'm sure once I figure it out it will be obvious.

Lionel.
 
A

Arved Sandstrom

Hmmmm, I've been trying to get it to work in Netbeans, but it makes
little sense to me. I'm sure once I figure it out it will be obvious.

Lionel.

It wasn't exactly all that obvious to me either - I just tried it out
with NetBeans yesterday...both NB 6.1 and NB 6.5. After some
experimentation, it boiled down to creating a new Java application, and
starting out by adding a JFrame form. I then created a simple POJO class
(the prospective bean), added a few properties to the bean using Source >
Insert Code, and then compiled.

At that point, when the JFrame is selected in the editor, you can go down
to the Beans section in the Palette, and click on "Choose Bean". Type in
the class of the bean. You get a little bean cursor after a bit, and drop
it onto the JFrame in the designer. At that point there is a reference to
the bean in the JFrame class, and it also shows up in the Inspector pane.

If you select the bean in the Inspector, you'll have the same kind of
properties window available for it that you have for any other component.

This is sort of half-assed, but it'll help get you started. I myself have
almost never dealt with Java beans in this way.

AHS
 
M

Mark Space

Arved said:
It wasn't exactly all that obvious to me either - I just tried it out
with NetBeans yesterday...both NB 6.1 and NB 6.5. After some
experimentation, it boiled down to creating a new Java application, and
starting out by adding a JFrame form. I then created a simple POJO class
(the prospective bean), added a few properties to the bean using Source >
Insert Code, and then compiled.

At that point, when the JFrame is selected in the editor, you can go down
to the Beans section in the Palette, and click on "Choose Bean". Type in
the class of the bean. You get a little bean cursor after a bit, and drop
it onto the JFrame in the designer. At that point there is a reference to
the bean in the JFrame class, and it also shows up in the Inspector pane.

If you select the bean in the Inspector, you'll have the same kind of
properties window available for it that you have for any other component.

This is sort of half-assed, but it'll help get you started. I myself have
almost never dealt with Java beans in this way.


The tutorial says much the same thing, I think. I haven't tried this
for 6.5, I think it was left out of 6.0 or 6.1, can't remember which.

<http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html>
 
W

Wesley MacIntosh

Arved said:
It wasn't exactly all that obvious to me either - I just tried it out
with NetBeans yesterday...both NB 6.1 and NB 6.5. After some
experimentation, it boiled down to creating a new Java application, and
starting out by adding a JFrame form. I then created a simple POJO class
(the prospective bean), added a few properties to the bean using Source >
Insert Code, and then compiled.

This could be useful for me, too. So Matisse can be made to accept a
general-purpose custom component if you use a Matisse function for
adding beans?
 
A

Arne Vajhøj

Wesley said:
This could be useful for me, too. So Matisse can be made to accept a
general-purpose custom component if you use a Matisse function for
adding beans?

It makes sense.

Originally the intention with Java beans was to be a component that
could also be used in GUI's.

Today Java beans usually just means a data carrying class with
getters and setters that are suitable for easy loading/saving.

Arne
 
N

none

Arved said:
It wasn't exactly all that obvious to me either - I just tried it out
with NetBeans yesterday...both NB 6.1 and NB 6.5. After some
experimentation, it boiled down to creating a new Java application, and
starting out by adding a JFrame form. I then created a simple POJO class
(the prospective bean), added a few properties to the bean using Source >
Insert Code, and then compiled.

At that point, when the JFrame is selected in the editor, you can go down
to the Beans section in the Palette, and click on "Choose Bean". Type in
the class of the bean. You get a little bean cursor after a bit, and drop
it onto the JFrame in the designer. At that point there is a reference to
the bean in the JFrame class, and it also shows up in the Inspector pane.

If you select the bean in the Inspector, you'll have the same kind of
properties window available for it that you have for any other component.

This is sort of half-assed, but it'll help get you started. I myself have
almost never dealt with Java beans in this way.

Thanks for the run down, I'll see if I can get it working for me.

Lionel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,253
Latest member
BlytheFant

Latest Threads

Top