Article View: es.comp.lenguajes.java
Article #17955Re: Imagen en applet
From: Juan Carlos Lotto
Date: Thu, 05 Oct 2000 00:00
Date: Thu, 05 Oct 2000 00:00
53 lines
2441 bytes
2441 bytes
This is a multi-part message in MIME format. --------------4D028D91CE3C2231505D2750 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit dteje wrote: > Hola. No consigo meter una imagen en un applet. > > Cual es la mejor manera de introducir una imagen, en por ejemplo, un JPanel, > y luego posicionarla? > > Yo lo que he intentado es crear un objeto image, pero luego no se como > introducir la imagen en este objeto. > Supongo que deber�a haber alg�n m�todo setnoseque(url) de image en el que se > pueda referenciar la imagen.(o algo parecido) > Tampoco se como meterla en el JPanel y situarla. > Si, se poca cosa, he estado dando vueltas y no lo encuentro. > Una ultima cosa, utilizo JBuilder. > > Si has le�do hasta aqu�, gracias. Si adem�s me puedes ayudar, m�s gracias. > > David Es bastante sencillo, lo unico que tienes que hacer es una vez creada la imagen sobrecargar el metodo piant para despues sobre el objeto Graphics usar la funcion boolean drawImage(Image objImg,int izq,int sup,ImageObserver imgOb). Un imageObserver es cualquier objeto AWT, basta con pasarle por esa opcion un this... --------------4D028D91CE3C2231505D2750 Content-Type: text/x-vcard; charset=us-ascii; name="juan.lotto.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Juan Carlos Lotto Content-Disposition: attachment; filename="juan.lotto.vcf" begin:vcard n:Lotto;Juan Carlos tel;cell:679786992 tel;work:913532430 x-mozilla-html:FALSE org:<a href="http://www.tecsidel.es"><IMG SRC="http://members.es.tripod.de/jagr/tecsidel.gif" border=0></a> adr:;;Enrique Jardiel Poncela, 6;Madrid;;28043;Espa�a version:2.1 email;internet:juan.lotto@mad.tecsidel.es title:<font color="#006660">Proyecto <b>SERA</b> x-mozilla-cpt:;-11456 fn:Juan Carlos Lotto end:vcard --------------4D028D91CE3C2231505D2750--
Technical Details
Message-ID:
<39DC7E38.93A9969D@mad.tecsidel.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<iajA5.594811$Z05.5863078@telenews.teleline.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: 1116f3,86b34078d6b274fa X-Google-Attributes: gid1116f3,public From: Juan Carlos Lotto <juan.lotto@mad.tecsidel.es> Subject: Re: Imagen en applet Date: 2000/10/05 Message-ID: <39DC7E38.93A9969D@mad.tecsidel.es> X-Deja-AN: 677832167 References: <iajA5.594811$Z05.5863078@telenews.teleline.es> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------4D028D91CE3C2231505D2750" Organization: Telefonica I+D Mime-Version: 1.0 Newsgroups: es.comp.lenguajes.java