Why should i use python if i can use java

James_Althoff at i2.com James_Althoff at i2.com
Thu Jun 7 20:31:12 CEST 2001

Alex Martelli wrote:
>Absolutely!  But does any commercial IDE, as you earlier
>referenced, support Jython yet?  I don't know of any.

I use a hybrid approach.  For example, I run JBuilder and use its design
layout tool (using Swing components) to do some GUI design: start with a
JPanel, add a JSplitPane, drop in a JTree, and a JTable, some JButtons,
etc.  Use the property editor to set property values.  Give each component
a name.  (I frequently use GridBagLayouts to position things nicely, btw.)
Then I compile and run it in JBuilder until it looks ok.  Now I start
writing in Jython.  I import the class created by JBuilder, make an
instance of it -- a JPanel subclass typically -- and add in handlers for
the buttons, trees, lists, tables, etc.  Each of these (JComponents) I
reference using the name that I assigned to the component when using
JBuilder (I have a little utility method that can search a JComponent and
all of its child components to find a component with a given name).  From
there on out, its all Jython.  Works like a charm!  (Actually, pdb doesn't
work very well when using Swing -- which can be a major pain sometimes.:
-( )


More information about the Python-list mailing list