Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Windows Transparent
Windows Transparent [message #521554] Thu, 18 March 2010 01:28 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 100
Registered: March 2010
Senior Member
Hello

I have a problem.
I have a program that it makes a transparent windows (whit java) I can execute whit eclipse, good.

I have a plug-in too, and I want to join both.
In my plug in I added a buton in the toolbar.
The butons's handler is a class that it's makes a transparent windows, but this isn't transparent, before this windows (YES) was trasnparent (when i execute her).

If before ths windos was transparent, why isn't it when i add it at plugin??

is This for SWT???????

Help me PLEASE.
Thanks a lot



I edit:

Yes i can do it.

[Updated on: Thu, 18 March 2010 18:55]

Report message to a moderator

Re: Windows Transparent [message #521812 is a reply to message #521554] Thu, 18 March 2010 19:04 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

Your snippet does not contain any swt. Am I missing something? Are you
saying that you have an AWT/Swing window that is transparent when shown from
a stand-alone application but is not transparent when shown from an eclipse
plug-in?

Grant


<kiuby_88@hotmail.com> wrote in message
news:hnrvkm$27q$1@build.eclipse.org...
> Hello
>
> I have a problem.
> I have a program that it makes a transparent windows (whit java) I can
execute whit eclipse, good.
>
> I have a plug-in too, and I want to join both.
> In my plug in I added a buton in the toolbar.
> The butons's handler is a class that it's makes a transparent windows, but
this isn't transparent, before this windows (YES) was trasnparent (when i
execute her).
>
> If before ths windos was transparent, why isn't it when i add it at
plugin??
>
> is This for SWT???????
>
> Help me PLEASE.
> Thanks a lot
>
> here code of Windows transparent
> import java.awt.Color;
> import java.awt.Dimension;
> import java.awt.GradientPaint;
> import java.awt.Graphics;
> import java.awt.Graphics2D;
> import java.awt.GraphicsDevice;
> import java.awt.GraphicsEnvironment;
> import java.awt.GridBagLayout;
> import java.awt.Paint;
> import java.awt.RenderingHints;
> import java.awt.event.MouseAdapter;
> import java.awt.event.MouseEvent;
> import java.awt.geom.Ellipse2D;
> import java.awt.geom.Point2D;
>
> import javax.swing.JButton;
> import javax.swing.JFrame;
> import javax.swing.JPanel;
> import javax.swing.SwingUtilities;
>
>
>
>
> public class VentanaTr extends JFrame{
>
> public JPanel panel;
>
> public JFrame ventana(){return this;}
> public JPanel pan(){return panel;}
> public VentanaTr()
> {
> super("Ventana Transparente");
> //Tenemos que permitir el per-pixel
> AWTUtilitiesWrapper.setWindowOpaque(this,false);
> setBackground(new Color(255,255,255,255));
> setSize(new Dimension(600,600));
> //Posicion regida por:
> setLocationRelativeTo(null);
> setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>
> panel = new JPanel()
> {
> @Override
> protected void paintComponent(Graphics g) {
> if (g instanceof Graphics2D) {
> final int R = 0;
> final int G = 0;
> final int B = 0;
>
> Paint p =
> new GradientPaint(0.0f, 0.0f, new Color(R, G, B, 1),
> 0.0f, getHeight(), new Color(R, G, B, 1), true);
> Graphics2D g2d = (Graphics2D)g;
> g2d.setPaint(p);
> g2d.fillRect(0, 0, getWidth(), getHeight());
> }
> }
> };
>
>
>
> //a
Previous Topic:Link with target="_blank" not working with MOZILLA
Next Topic:How to correctly display the Angstrom symbol ?
Goto Forum:
  


Current Time: Sat Dec 14 17:50:05 GMT 2024

Powered by FUDForum. Page generated in 0.05161 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top