Questions tagged [glasspane]

The glass pane, which is used in Java, is useful, when you want to be able to catch events or paint over an area that already contains one or more components.

101 questions
12
votes
3 answers

placing a transparent JPanel on top of another JPanel not working

I am trying to place a JPanel on top of another JPanel which contains a JTextArea and a button and i want to the upper apnel to be transparent. I have tried it by making the setOpaque(false) of the upper panel. but it is not working. Can anyone help…
Nikhil
  • 2,857
  • 9
  • 34
  • 58
11
votes
4 answers

Placing component on Glass Pane

I have a subclass of JLabel that forms a component of my GUI. I have implemented the ability to drag and drop the component from one container to another, but without any visual effects. I want to have this JLabel follow the cursor during the drag…
Chris Lieb
  • 3,706
  • 7
  • 36
  • 48
6
votes
1 answer

Java Glass pane

I have a problem. I want to ask you how can I implement GlassPane to paint on it. I mean, if I click mouse button, in mouseClicked event, my transparent glass pane should be created, because I want to see all my components behind glassPane and I can…
edi233
  • 3,511
  • 13
  • 56
  • 97
6
votes
1 answer

glassPane is not blocking input

I've build a small GUI game in java and at some point I'm using a glassPane to temporarily block all mouseinput. I've used the glassPane before without any problems but this time it won't block the mouseinput. So I can still press a button that…
Jesse
  • 1,332
  • 2
  • 14
  • 25
6
votes
1 answer

Layout Manager and Positioning

how to stick JLabel in GlassPane to rellative, floating coordinates from JProgressBar without using ComponentListener or another listener, is there built_in notifiers in Standard LayoutManagers that can notify about its internal state, and can be…
mKorbel
  • 109,525
  • 20
  • 134
  • 319
5
votes
2 answers

Wait cursor and disable java application

I want to have the user press a button to kick off a background thread. While the thread is processing, I want two things to happen: 1) A WAIT_CURSOR should be displayed. 2) The application should not respond to mouse events. As per the setCursor…
bigleftie
  • 453
  • 1
  • 6
  • 17
5
votes
3 answers

X11/Xlib: Create "GlassPane"-Window

I've tried to create a fully transparent window using C++ & X11. It should not consume any events and simply forwards them to the windows below. Some kind of GlassPane as it's known for Java-Windows, but full screen. Then I'd like to draw on this…
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
5
votes
2 answers

Swing: GlassPane prevents mouse pointer from changing

I have a JTabbedPane with some tabs and a lot of unused extra space next to the tabs. So I'm trying to use it and place some buttons there (like in Eclipse). I put the buttons on a GlassPane: JPanel glasspane = getPanelWithButtons(); …
nokul
  • 572
  • 2
  • 10
4
votes
1 answer

Layering multiple GlassPane's in a Root Container

Is it possible to add multiple GlassPanes for a single JFrame, or do I have to use the uncomfortable LayeredPane with the Opacity attribute. I have attached some code that shows what I want to do (provided by @camickr). import java.awt.*; import…
mKorbel
  • 109,525
  • 20
  • 134
  • 319
4
votes
1 answer

Use case of Glass Pane vs. Layered Pane

I've always been a little fuzzy on the difference between the glass pane and a layered pane. Is the glass pane essentially just "the very top layer of the root pane," or does it behave differently? When would you use a layered pane instead of the…
Amanda S
  • 3,266
  • 4
  • 33
  • 45
4
votes
2 answers

Inner-Transparent Selection Window in Java using GlassPane

I am trying to achieve the following http://www.qksnap.com/i/3hunq/4ld0v/screenshot.png I am currently able to draw rectangles successfully on a semi-transparent glasspane background using the following code: protected void…
Patrick M
  • 387
  • 2
  • 13
4
votes
1 answer

Calculator application including keyboard input in java swing

I have a calculator application in java swing, which is working properly with mouse click input. Now I want it to read input using keyboard button stroke. I had heard about the glass pane in java tutorial, but i need to know any other simple method…
Jimshad Abdulla
  • 167
  • 2
  • 8
3
votes
1 answer

How is it possible to paint more than one rectangle on a glass pane?

I am trying to paint a series of rectangles on the glass pane as described in here. the thing is that only the last element from my list is being displayed on the pane. Does anyone how to be able to paint more then one rectangle on the same…
ict1991
  • 2,060
  • 5
  • 26
  • 34
3
votes
1 answer

Java Dialog setModal

Related to my previous question Java Project - how to freeze Frame, Is it possible to darken the color of the main screen (make EVERYTHING gray or black and white) to highlight the player dialog box? How can I do that?
newbie
  • 14,582
  • 31
  • 104
  • 146
3
votes
1 answer

How to delegate mouse events to all underlying overlapped panes in JavaFX?

I have some top decoration pane, which I want to process/preprocess mouse events, but which should not consume them, i.e. all overlapped panes should work as if they were not overlapped by decoration pane. How to do this? I failed with several…
Dims
  • 47,675
  • 117
  • 331
  • 600
1
2 3 4 5 6 7