Newsgroup: it.comp.java
Titolo: Background

    Come posso utilizzare un immaggine gif come background dell'applet?
lele
--
----------------------------------------------------------------------------
---------------------------------------------------------------------
Internet veramente gratis!
https://www.alladvantage.com/joinsecure.asp?refid=SBT352&cntry=0
Messaggi gratis con il tuo cellulare?
http://www.smscash.it/index.php3?pagid=reg&p_form=P&p_pres=0&cpre=1625873&p_
desc=1
www.goingtonight.it/register2.php?gtn=21993
cosa aspetti ad iscriverti al primo villaggio mobile del mondo?

    Come posso utilizzare un immaggine gif come background dell'applet?
non so se e' questo quello che intendi...
/*
 * demo.java (applet) - version 0.1
 * Copyright (C) 2000 Andrea Medeghini
 * 
http://digilander.iol.it/schiele
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
import 	java.applet.*;
import 	java.awt.*;
public class demo extends Applet
{
	protected Image i;
	protected int w;
	protected int h;
 
	public void start() 
	{
		w = getSize().width;
		h = getSize().height;		
 
		i = getImage(getCodeBase(),"demo.gif");
	}
	public void paint(Graphics g)
	{
		if (i != null) g.drawImage(i,0,0,w,h,this);
	}
}
http://digilander.iol.it/schiele

 wrote in message
3a911cbc...@news.tiscalinet.it...


sopra,immagini testo bottoni...
penso che meglio di cosi' non si possa fare
/*
 * DemoBackground.java (version 0.1)
 *
 * Copyright (C) 2000 Andrea Medeghini
 * 
http://digilander.iol.it/schiele
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
import 	java.applet.*;
import 	java.awt.*;
import 	java.awt.event.*;
public class DemoBackground extends Applet
{
	protected Pannello p;
	protected Image i;
 
	public void init() 
	{
		String file = getParameter("file");
 
		if (file != null)
		{
			i = getImage(getCodeBase(),file);
			int w = getSize().width;
			int h = getSize().height;		
			p = new Pannello(w,h);
			GridBagLayout l = new GridBagLayout();
 
			GridBagConstraints c = new GridBagConstraints();
 
			setLayout(l);
 
			c.fill = GridBagConstraints.NONE;
 
			c.gridwidth = GridBagConstraints.REMAINDER;
 
			l.setConstraints(p,c);
			add(p);
		}		
	}
	public void destroy() 
	{
		if (p != null) remove(p);
	}
	public void paint(Graphics g)
	{
		if (i != null) g.drawImage(i,0,0,this);
	}
}
class Pannello extends Panel implements ActionListener
{
	public Pannello(int w,int h)
	{
		Button p1 = new Button("uno");
		Button p2 = new Button("due");
		GridBagLayout l = new GridBagLayout();
		GridBagConstraints c = new GridBagConstraints();
		setLayout(l);
		c.fill = GridBagConstraints.BOTH;
		c.gridwidth = GridBagConstraints.REMAINDER;
		l.setConstraints(p1,c);
		l.setConstraints(p2,c);
		add(p1);
		add(p2);
		setSize(w,h);
		p1.addActionListener(this);
		p2.addActionListener(this);	
	}
 
	public void actionPerformed(ActionEvent e)
	{
	}
}
ciao_O
http://digilander.iol.it/schiele