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
1
vote
1 answer

How should I drag a JLabel from one JPanel in a JFrame onto a JTextField in another JPanel in the same JFrame?

In short, I want to set the text of a JLabel to be that of a JTextField in a JPanel (pnlUser) and then drag the JLabel across the screen from JPanel onto another JTextField in another JPanel (pnlGrid). Here are the details. I have written a…
DSlomer64
  • 4,234
  • 4
  • 53
  • 88
1
vote
3 answers

How to properly implement a glass pane in Java?

I'm attempting to add a fancy InfiniteProgressPanel as a GlassPane for my big Swing program. However, it does not appear. It looks similar to this: ... InfiniteProgressPanel glassPane = new…
Sturm
  • 689
  • 2
  • 23
  • 52
1
vote
1 answer

create an transparent rectangle over blurred background in jframe

I am having problem in creating an transparent rectangle over blurred background. I am trying to do this task on glasspane. Here is my code snippet. void createBlur() { alpha = 1.0f; JRootPane root = SwingUtilities.getRootPane(jf); …
Vighanesh Gursale
  • 921
  • 5
  • 15
  • 31
1
vote
2 answers

removing mouse events/controls from swing components with glasspane

I have a client-server application and i am using swing in the client side. My swing client has one main window (jframe) and lots of panels, toolbars and menubar in it. I want to remove all client action/mouse events (or simply grab and do nothing)…
Deger
  • 118
  • 1
  • 6
1
vote
1 answer

How to cover SWT control or controls with some transparent layer?

I want to implement selecting capability in my custom control. This control contains an image and I want image to turn bluish when selected. I don't want to change image bitwise. Is it possible to draw some half-transparent blue rectangle above…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
1
vote
2 answers

How to force repaint of a glass pane?

I have a Swing app with a glass pane over a map. It paints dots at certain positions. When I click somewhere on the map, and the glass pane receives the message CONTROLLER_NEW_POLYGON_MARK I want do display an additional dot at the position…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
1
vote
1 answer

Icon is not set right on GlassPane

I have a class that sets warning icons behind a textField when the input is different from what i expect form the user. For textfield this class works perfect, but when i'm trying to use it with a textArea the warning icons aren't set on the right…
Bjorn
  • 457
  • 1
  • 7
  • 22
1
vote
1 answer

New invisible layer in JPanel

I would like to ask for help. I want something like this: http://docs.oracle.com/javase/tutorial/uiswing/components/rootpane.html#glasspane I have this application with map and i want to have a small picture in an new invisible layer. Small…
MmM ...
  • 131
  • 1
  • 2
  • 14
1
vote
2 answers

Setting background image and greyed GlassPane in Java (Swing)

I'm struggling with two Java GUI things at the moment. This is the situation: I'm designing a word game using Swing components. I have a main JFrame where everything is placed (my GUI class extends JFrame). There are two things I want to do: 1st: I…
E. V. d. B.
  • 815
  • 2
  • 13
  • 30
1
vote
1 answer

Mouse resize cursors don't work when using glass pane

In the below example, I have a table. If you hover the mouse over the table header column edges, the cursor changes to the resize cursor symbol. However, if you uncomment the line below to set the glass pane visible, the cursor no longer changes…
martinez314
  • 12,162
  • 5
  • 36
  • 63
1
vote
1 answer

Why does Canvas as contentPane not paint opaque components that are added to the JFrame glasspane

Okay I have a Canvas (I am using this because it can implement BufferedStrategy). I add my Canvas to my JFrame contentPane and than add HUDPanel ( which is a JPanel consisting of 2 other JPanels - with JProgressBars and JLabels - to show health and…
David Kroukamp
  • 36,155
  • 13
  • 81
  • 138
1
vote
1 answer

Form Glass Pane in LWUIT

I'm trying to make a waiting screen using Form Glass Pane in LWUIT, the following is the code that I'm using public class LoadingGlassPane implements Painter { public static boolean isShown = false; public static IForm form; public…
Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175
1
vote
1 answer

Introducing JLayeredPane to an existing JFrame

I've been staring at Oracle's JLayeredPane tutorials but they are laid out in a manner that is confusing to me and doesn't get at what I am trying to do. I have an application that up to now has had no concept of layers. Everything is laid out in a…
Steve Cohen
  • 4,679
  • 9
  • 51
  • 89
1
vote
2 answers

JWebBrowser (extends JPanel) Showing Above Glass Pane

I am using the DJ Native Swing API to be able to use JWebBrowser. public class GUI extends JPanel { Robot robot; JComponent glassPane; public GUI(final Bot bot) { super(new BorderLayout()); try { robot = new…
Sam P
  • 1,821
  • 13
  • 26
0
votes
1 answer

how to draw line on glasspane?

Please can anyone help me on this. I have this jtable and I want to draw a line on it in any directions. I've also read about glasspane which made it possilbe but I couldn't manage to do it. Can anyone give me example on this. PS. I use extended…