Questions tagged [awtutilities]

16 questions
5
votes
1 answer

Java: Animated GIF with transparent window

I'm trying to display an animated gif on a transparent JDialog using a simple JLabel: JDialog dialog = new JDialog(); AWTUtilities.setWindowOpaque(dialog,false); JLabel label = new JLabel(); ImageIcon ii = new…
Shinmera
  • 310
  • 1
  • 6
4
votes
2 answers

Transparent JButton still painting its background

I have a translucent JPanel. I have created a custom JButton by extending JButton as I required a button with rounded corners and wanted to add some effects to it. I have made the button non-opaque. When I add this button to my translucent JPanel it…
swarnabh
  • 41
  • 1
  • 2
4
votes
2 answers

Should I be concerned using AWTUtilities.setWindowShape()?

I am using the AWTUtilities class in my application to create custom window shapes. As far as I know, there is no other way to do it. It is a requirement. The javadoc generation gives me this error: warning: com.sun.awt.AWTUtilities is Sun…
Erick Robertson
  • 32,125
  • 13
  • 69
  • 98
4
votes
1 answer

How to distribute AWTUtilities

I recently read the blog posts on Pushing Pixels that describe how to achieve native transparency and translucency with pure Java. The needed classes reside on com.sun.awt namely com.sun.awt.AWTUtilities. I was wondering how i could include the…
Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104
3
votes
4 answers

AWTUtilities Transparent JFrame

Using this article from sun. I am trying to create a transparent window. I have one image inside a label on the frame. I want the image to be visible but the frame invisible. When i use try { Class awtUtilitiesClass =…
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
2
votes
1 answer

AWTUtilities setWindowOpaque causing problems

I have a modal JDialog that I set non-opaque with a call to the com.sun.awt.AWTUtilities method, setWindowOpaque(this, false). I encounter problems when I set the modal JDialog to be non-opaque. For example, when I click on a button a non-opaque…
2
votes
1 answer

Is there a way to use AWTUtilities on JRuby?

I am trying to give a window in my desk app transparency. I've come across the AWTUtilities method, setWindowOpacity(), but I haven't been able to use it on my project. The line import com.sun.awt.AWTUtilities does not seem to work. Is there a…
slvdrog
  • 25
  • 2
2
votes
1 answer

Transparency in Java

I've been using the new com.sun.awt.AWTUtilities class and am intrigued. I got com.sun.awt.AWTUtilities/setWindowOpacity(java.awt.Window window, float f) to work perfectly, but am now wondering if there is any way to change the opacity of an…
Ky -
  • 30,724
  • 51
  • 192
  • 308
2
votes
1 answer

error when import AWTUtilities

I try to use AWTUtilities if these are enabled so I use the ways import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import…
Luisk4
  • 377
  • 1
  • 5
  • 12
2
votes
1 answer

transparant background in a jframe but with window border etc

So i can try and ask my problem but for your sake and my sake i have created a simple image in photoshop to try to tell you what i want to achieve: I have tried to work with the Opaque stuff in AWTUtilities but it does not seem to work do you guys…
sn0ep
  • 3,843
  • 8
  • 39
  • 63
1
vote
1 answer

mouse events on multiple polygons in java swing

i am trying to write a code for my task. my task is, i have draw may polygons on a single panel by giving coordinate values. and aplly mouse moved event to those polygons. my problem is i can draw all polygons but don't know how to apply mousemoved…
ran
  • 667
  • 4
  • 9
  • 16
1
vote
2 answers

Highlight polygons with mouseentered event

I am very new to Java Swing, and I am working on an assignment. I have some polygons on my component. When I entered in to a polygon it has to highlight (i.e. filled with some color). When I go to next polygon it has to highlight and previous one…
ran
  • 667
  • 4
  • 9
  • 16
1
vote
2 answers

zoom in/out graph using AWT on Applet

I am newbie to the java....working on a piece of applet code...............as I am still going through the OOPs concepts and java understanding and need to develop below mentioned functionality. The piece of code I have works like this : First it…
CJ_world
  • 45
  • 10
1
vote
2 answers

AWTUtilities not found

I am working on a small Java application and I'd like to use transparent windows. However when I use AWTUtilities. I get this: 'AWTUtilities cannot be resolved' I've looked for solutions but I'm unable to understand them. Could you…
Saturnian
  • 1,686
  • 6
  • 39
  • 65
0
votes
2 answers

How to change a JFrame opacity realtime

Is there any good way to change a JFrame opacity real time. right now i need to restart the window to get the opacity if (Variables.LoggerOpacity){ if (AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.TRANSLUCENT)) { …
jeroen
  • 41
  • 2
  • 4
1
2