AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Swing JPanel generator from class (for class attribute editi

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
John Abraham
Guest





PostPosted: Thu Jun 24, 2004 8:23 pm    Post subject: Swing JPanel generator from class (for class attribute editi Reply with quote



Is there any tool (public domain or otherwise) that will generate
JPanels or JDialogs to edit the attributes of a class? A default
instance editor?

I've looked at many of the GUI builders, and for the most part I think
I prefer to hand code my GUI code. But it would be nice to have an
initial implementation to start with -- a JTextField in the
view-controller for every String in the model, a JTable for every
array or ArrayList in the model, a button for every class reference
variable that would open a dialog for that class, a checkbox for every
boolean, etc.

It seems like it would be easy to generate such code. It must be,
because I keep typing the same mindless things over and over.

--
John Abraham
jabraham (at) ucalgary (dot) ca
Back to top
Roedy Green
Guest





PostPosted: Thu Jun 24, 2004 9:13 pm    Post subject: Re: Swing JPanel generator from class (for class attribute e Reply with quote



On 24 Jun 2004 13:23:41 -0700, [email]jabrahamsspam (AT) mailinator (DOT) com[/email] (John
Abraham) wrote or quoted :

Quote:
Is there any tool (public domain or otherwise) that will generate
JPanels or JDialogs to edit the attributes of a class? A default
instance editor?

I've looked at many of the GUI builders, and for the most part I think
I prefer to hand code my GUI code. But it would be nice to have an
initial implementation to start with -- a JTextField in the
view-controller for every String in the model, a JTable for every
array or ArrayList in the model, a button for every class reference
variable that would open a dialog for that class, a checkbox for every
boolean, etc.

It seems like it would be easy to generate such code. It must be,
because I keep typing the same mindless things over and over.

I call those things stompers. I have posted code for them and got a
rain of cabbages for wasting bandwidth. I you send me an unmunged
email I will send you mine you can tweak for yourself. I don't
release them as products since they are not usable without tuning for
your own circumstances.


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

Back to top
Will Hartung
Guest





PostPosted: Thu Jun 24, 2004 9:15 pm    Post subject: Re: Swing JPanel generator from class (for class attribute e Reply with quote



"John Abraham" <jabrahamsspam (AT) mailinator (DOT) com> wrote

Quote:
Is there any tool (public domain or otherwise) that will generate
JPanels or JDialogs to edit the attributes of a class? A default
instance editor?

I can't think of any specific examples, but there may be something
"stealable" from any of the IDEs that let you edit JavaBean components,
because that's basically the same thing.

Most seem to use a JTable for the entire thing.

Other than that, it's a pretty a simple matter to hack something out using
reflection. Layout is always a detail, plus label names and value
validation. That immediately expands the scope from a "simple hack" to
something else.

It would take me 1-2 hours to rough that out if I punted on collections in a
JTable (because then you need to make a dynamic model to support the beans
in the collection, which is essentially the exact same problem using a
JTable instead of the JPanel -- plus I don't have a good dynamic JTable
working well yet).

But it is a good idea, and I may just write something like that.

Regards,

Will Hartung
(willh (AT) msoft (DOT) com)



Back to top
John Abraham
Guest





PostPosted: Sat Jun 26, 2004 5:01 pm    Post subject: Re: Swing JPanel generator from class (for class attribute e Reply with quote

Roedy Green <look-on (AT) mindprod (DOT) com.invalid> wrote

Quote:
On 24 Jun 2004 13:23:41 -0700, [email]jabrahamsspam (AT) mailinator (DOT) com[/email] (John
Abraham) wrote or quoted :

Is there any tool (public domain or otherwise) that will generate
JPanels or JDialogs to edit the attributes of a class? A default
instance editor?

I call those things stompers. I have posted code for them and got a
rain of cabbages for wasting bandwidth. I you send me an unmunged
email I will send you mine you can tweak for yourself. I don't
release them as products since they are not usable without tuning for
your own circumstances.

Ok, cool, thanks. I'll email you directly.

Interestingly when searching google I found that I posted virtually
the same post in June of 1999, 5 years ago! The more things change...

[url]http://groups.google.ca/groups?q=group:*java*+jabraham&hl=en&lr=&ie=UTF-8&selm=7jq16t%24e9u%40ds2.acs.ucalgary.ca&rnum=1[/url]

--
John
jabraham (at) ucalgary (dot) ca

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.