Transparent Window - java

I have a fullscreen JFrame. I added a map to JPanel then added it to JFrame. Now I want to add a transparent window to JFrame. I want to see all map and I want to move transparent window.
I did it with internal frame but I couldn't it's title tranparent.
Could you help me about this?
Thanks ...

One possible way is to add a JPanel to the glasspane.

Does com.sun.awt.AWTUtilities.setWi­ndowOpacity(this, 0.3f); work? (although it's not an officially supported API, natch). Regardless, there's an article on this here.

http://techgearup.wordpress.com/2008/09/19/transparent-jframe-background/
This might help... as a starting point, at least.

If you´r having truble finding it on google it could be because you'll have to google "Translucent"
http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/

Related

How to put maximize and minimize buttons in a jDialog?

my question is very simple. I am creating an app with Java swing, and i realized that the jDialogs doesn´t have maximize and minimize buttons, instead of the jFrame.
There is a way to add it to it? or if not, what can i do if i want to replace the jDialog to another swing component that it has?
Thanks a lot!
To answer my question, i have used the cardLayout to create differents jPanels and including into my jFrame, every time that i want to show another "window" i change it to the corresponding jPanel..
You can see the documentation of cardLayout here:
https://docs.oracle.com/javase/tutorial/uiswing/layout/card.html

How to make a JFrame Transparent?

I have been working on a screen recorder app in Java.
I need to know ho to create a JFrame fully transparent?
Like this.
You can make a JFrame partially transparent using the frame.setOpacity(float opacity) method.
For more information, see the Java Tutorial on the subject.
Caution: If you make if the frame 100% transparent, users won't be able to see it.

How to resize controls at runtime in java

Is there a way to resize a control, a JTextfield for example, at runtime in java? I want my textfield to have the resize cursors (just like when you point your cursor on the corner of a window) and will be able to resize on runtime. Ive read on the internet that vb6 and C# have those capabilities, is there anything for java? A sample code or a link to a good tutorial will be very much appreciated. Thank you.
It sounds like you are trying to implement a component editor, such as the GUI editors available in popular programing IDEs. The essential feature is a handle, a graphical object that can be selected and dragged to change the geometry. GraphPanel is a simple example of an object drawing program that illustrates many of the required techniques.
That depends on the Layout of the JTextField's container. A good tutorial is available at http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html
For a quick and cheap solution you could use a JSplitPane component, with the JTextField to be resized in the left side, and an empty JPanel in the right side. By default a JSplitPane is decorated with a border and a divider, but you can remove these by setting an empty border.

Veil LoadingImage or LoadingPanel over JFrame

Is there any component in Swing(X) by which we can place a veil loading image over a panel or frame making it transparent during some lengthy background processing?
Few examples of Romain Guy's work:
Chapter 9 of “Filthy Rich Clients” book, with downloadable code
SwingFX: Pretty Progress Panels
Glasspane Painting
GlassPane Intercepts
And other example:
GlassExample
You're looking for the Glass Pane, work through the tutorial here and the relevant section here
You need to add a glasspane to the frame, thats right. But you also can use SwingX' JXFrame and simply set a waitpane and activate it when a loading action starts.
Have a look at the API

Add transparent JPanel upon AWT Component to paint on

I've got a Problem: In my Java application I've got an AWT Component (cannot change that one) that streams and shows an avi-file. Now I want to draw upon this movie and thought about putting a transparent JPanel above it and draw on that one.
This does not work since I either see the avi-stream or the drawn lines but not both.
I read somewhere that AWT does not support transparency of components - but the panel is a JPanel which is able to do so.
Can someone please help me with this one - thanks in advance.
The Mixing Light and Heavyweight Components article explains how this is handled only in the most recent version of the JDK.
did you try a GlassPane since i think thats exactly it's use case. soemthing like JFrame.setGlassPane() if i remember correctly. check here:
Java API JFrame
GlassPane examples
I've searched for a heavyweightcomponent that could help me but I didn't found one, and regarding the internalframes I don't know how you managed to set the opacity to 50. All what I found about seetting the opacity wast the method setOpaque(boolean value) and this doesn't help me at all. Would you please explaine me how did you set that opacity. It's my final alternative either that or I'll have to change my entire project design.
Try running Stream and Drawing on separate thread. I think this can help

Categories