<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Últimas mensagens do tópico "Background no JDesktopPane"]]></title>
		<link>http://www.guj.com.br/posts/list/13.java</link>
		<description><![CDATA[Últimas mensagens enviadas no tópico "Background no JDesktopPane"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Background no JDesktopPane</title>
				<description><![CDATA[ Boa tarde, estou com uma dúvida em relação ao JDesktopPane. Como faço pra colocar uma imagem de Background e ñ uma cor?<br /> <br /> desde já agradeço;<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708218/background-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708218/background-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 15:37:05]]> GMT</pubDate>
				<author><![CDATA[ Gregori]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ Bom eu já consegui fazer isso com panel, nesse caso você deveria extender uma classe de JDesktopPane e  sobreescrever o método onPaint da classe extendida ai nesse caso você poderia criar um objeto Image e passar esse imagem no método que desenha. Assim o código eu não tenho aqui mas você pode procurar no fórum que com certeza vai encontrar rapidamente.<br /> <br /> Espero ter ajudado  <img src="http://www.guj.com.br/images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" border="0"> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708225/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708225/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 15:44:14]]> GMT</pubDate>
				<author><![CDATA[ laudenpower]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ Uma vez achei um tópico falando com funcionava era mais ou menos assim:<br /> [code]desktop = new JDesktopPane() {<br />         @Override<br />         public void paintComponent (Graphics g){<br />         ImageIcon img = new ImageIcon("img\\fundo.jpg");<br />         Dimension d = Main.imageDesktop(img, desktop, 0, 0);<br />         int width = (int) d.getWidth();<br />         int height = (int) d.getHeight();<br />         g.drawImage(img.getImage(),width,height,null);<br />         super.paintComponent(g);<br />         }};<br />         desktop.setOpaque(false);[/code]]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708227/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708227/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 15:46:39]]> GMT</pubDate>
				<author><![CDATA[ cidfillippe]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ imagem centralizada no seu JDesktopPane:<br /> <br /> [code]<br /> class DecoratedDesktopPane extends JDesktopPane {<br /> <br />         private Image img;<br /> <br />         public DecoratedDesktopPane() {<br />             try {<br />                 img = javax.imageio.ImageIO.read(new java.net.URL(getClass().getResource("/caminho/img.png"), "img.png"));<br />             } catch (Exception ex) {<br />             }<br />         }<br /> <br />         @Override<br />         public void paintComponent(Graphics g) {<br />             super.paintComponent(g);<br />             if (img != null) {<br />                 Dimension dimension = this.getSize();<br />                 int x = (int)(dimension.getWidth() - img.getWidth(this)) / 2;<br />                 int y = (int)(dimension.getHeight() - img.getHeight(this)) / 2;<br /> <br />                 g.drawImage(img, x, y, img.getWidth(this), img.getHeight(this), this);<br />             } else {<br />                 g.drawString("Imagem nao encontrada", 50, 50);<br />             }<br />         }<br />     }<br /> [/code]]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708235/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708235/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 16:00:00]]> GMT</pubDate>
				<author><![CDATA[ didiosam]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ Tipo agora fiquei curioso... Você gostaria de alterar a imagem de fundo por qual motivo? Tipo se fosse o caso de colocar um logo do sistema, não seria mais fácil colocar a imagem em um JLabel e centralizar na tela?]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708249/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708249/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 16:31:11]]> GMT</pubDate>
				<author><![CDATA[ laudenpower]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ lauden: a classe JDesktopPane foi projetada para exibir JInternalFrame's (que admitem justaposição), não componentes tais como JLabel. JInternalFrame's podem ficar justapostos, mas um JLabel não admite outros componentes justapostos sobre ele. Assim, o caminho correto para exibir uma imagem em JDesktopPane é realmente via paintComponent() - se você tentar exibir um JInternalFrame numa área coberta por um JLabel, muito provavelmente o JInternalFrame não vai aparecer.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708276/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708276/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 18:49:50]]> GMT</pubDate>
				<author><![CDATA[ roger_rf]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ apenas para complementar, nao fiz o teste com JLabel, mas jah coloquei JButton no JDesktopPane e o que ocorre é que quando voce abre um JInternalFrame e passa com o mouse sobre ele, o button vem para frente, é algo como se aquela parte do JInternal fosse "apagada" e o button que está atras acaba aparecendo... colocando JPanels com buttons no JDesktop o comportamento é parecido, eles acabam aparecendo sempre sobre os JInternalFrame...<br /> <br /> [/´s]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708310/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708310/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Fri, 3 Jul 2009 22:22:01]]> GMT</pubDate>
				<author><![CDATA[ didiosam]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ Valeu pelas dicas, foram de muita ajuda! Consegui resolver o problema.<br /> <br /> Valeu]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708390/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708390/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Sat, 4 Jul 2009 14:27:37]]> GMT</pubDate>
				<author><![CDATA[ Gregori]]></author>
			</item>
			<item>
				<title>Re:Background no JDesktopPane</title>
				<description><![CDATA[ [quote=roger_rf]lauden: a classe JDesktopPane foi projetada para exibir JInternalFrame's (que admitem justaposição), não componentes tais como JLabel. JInternalFrame's podem ficar justapostos, mas um JLabel não admite outros componentes justapostos sobre ele. Assim, o caminho correto para exibir uma imagem em JDesktopPane é realmente via paintComponent() - se você tentar exibir um JInternalFrame numa área coberta por um JLabel, muito provavelmente o JInternalFrame não vai aparecer.[/quote]<br /> <br /> Bom nesse caso acredito que com JLabel a coisa pode ser um pouco diferente, digo isso por que no meu trablho final de programação, para incrementar o aplicativo, eu coloquei uma imagem em um Jlabel e adicionei ao JDesktopPane sendo que o mesmo se comportou normalmente com os JInternalFrame's abertos sobre ele, nesse caso acredito que talvez a regra apenas se aplica a componentes que podem receber foco sendo que o JButton é um desses componentes.<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/131490/708438/rebackground-no-jdesktoppane
</guid>
				<link>http://www.guj.com.br/prepost/131490/708438/rebackground-no-jdesktoppane
</link>
				<pubDate><![CDATA[Sat, 4 Jul 2009 19:47:59]]> GMT</pubDate>
				<author><![CDATA[ laudenpower]]></author>
			</item>
	</channel>
</rss>
