From: Daniel L. <da...@br...> - 2001-07-13 15:40:19
|
> How do I apply constraints to a GridBag? > >>>> from pawt import swing, awt, GridBag >>>> >>>> frame = swing.JFrame() >>>> c = awt.GridBagConstraints() >>>> button = swing.JButton() >>>> gridbag = GridBag(frame.contentPane) >>>> gridbag.setConstraints(button,c) > Traceback (innermost last): > File "<console>", line 1, in ? > AttributeError: setConstraints >>>> Generally, replace the key word for the Java accessor methods "get" and "set" with just the field name, e.g. gridBag.setConstraints --> gridBag.constraints I have used GridBagLayout very successfully in Jython. Now custom cell renderers in JTable, well that's a different issue ;-) |