From: Red C. <le...@ya...> - 2005-04-12 07:07:05
|
Hello: I'm write this program in jython based in a recipy of ASPN, and I need some, help. I need add a scrollbar and refresh the images, because this visor adds the images one after other and is necesary resize the windows to see the images. Thanks the code is: import javax.swing as swing from java import net from java import awt as awt win=swing.JFrame("Visor",size=(500,500)) campo=swing.JTextField(preferredSize=(200,30)) def presion(event): view(campo.text) def view(url): win.getContentPane().add(swing.JLabel(swing.ImageIcon(net.URL(url)))) boton=swing.JButton("Ver",preferredSize=(100,30),actionPerformed=presion) win.contentPane.add(campo) win.contentPane.add(boton) win.contentPane.layout=awt.FlowLayout() /*Some help please I added this line to see the text field and the button but I don't now realy do*/ win.pack() win.show() PD. Sorry about my bad English. _________________________________________________________ Do You Yahoo!? La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx |