Questions tagged [jlayeredpane]

JLayeredPane is a Java Swing component that adds depth to a JFC/Swing container, allowing components to overlap each other when needed.

JLayeredPane is a Java Swing component that adds depth to a JFC/Swing container, allowing components to overlap each other when needed.
See How to Use a Layered Pane for more information.

272 questions
0
votes
0 answers

how to use setLayout for JLayeredPane in netbeans drag&drop?

i try to use JLayeredPane with netbeans drag&drop i need to setLayout & setLayer of it(in design view) but i can't find setLayout if i write setLayout manually(in source view), it will no effect in design view (i need the effect in design view to…
mopr mopr
  • 193
  • 2
  • 4
  • 13
0
votes
1 answer

Swing game layout issue

I'm working on implementing a game in layered panes and i'm running into some layout issues. For some reason, nothing lines up correctly. I end up with a white space at the top of my frame and the frame never extends out to the correct size to fit…
user1642463
0
votes
2 answers

JLayeredPane with transparent layer causes incorrect drawing

I have a JLayeredPane that has two layers. The top level is fully transparent and acts as a glass pane that captures mouse events and then dispatches them to the pane beneath it. The bottom layer does not draw correctly for an unknown reason. Do I…
smuggledPancakes
  • 9,881
  • 20
  • 74
  • 113
0
votes
2 answers

Moving JLabel's on a JLayeredPane

I need to move a number of JLabels around on top of a JLayeredPane dynamically. the problem is that they do not refresh properly. Sometimes they move correctly, sometimes they don't appear at all. My code looks like this: Building the…
LosTheRed
  • 15
  • 1
  • 5
0
votes
1 answer

How can I create a JFrame composed of a JLayeredPane with the ability to draw over an Applet?

I'm trying to create a GUI in which I can draw "above" an Applet based on the content within the Applet. To test this I'm trying to fill in a simple rectangle by creating a panel with a filled background to appear over the applet, through use of a…
user1625108
  • 91
  • 1
  • 5
0
votes
1 answer

Could you explain these statements?

I've come across an example on the internet which uses both of these statements: dp.add( bg , new Integer( 50 ) ); (dp being a JDesktopPane object and bg being a JLabel) setLayeredPane( dp ); If you would like to know how they are used, then this…
user1583010
0
votes
2 answers

Resizing LayeredPane Swing

I have a JPanel that uses BorderLayout and contains a jTable and a layeredPane. I need to use the layeredPane because it contains a jComboBox on top of a jTextPane. The problem is that when the user resizes the screen, the layeredPane doesn't…
Stefana Fratean
  • 164
  • 1
  • 8
0
votes
1 answer

Java Swing GlassPane functionality for individual panels?

I have built a simple interface that fills my entire JFrame. I am using a version of the class FinalGlassPane discovered on the internet here. This glass pane has no regular event listeners, but it monitors the AWTEvents of it's underlying…
Ralph Oreg
  • 233
  • 1
  • 2
  • 10
0
votes
1 answer

Transparent JLabels on a JLayeredPane

I am trying to display several PNG Images on a JLayeredPane with overlapping. Here is the current code for generating the JLabel containing the image and adding it to the JLayeredPane : BufferedImage im = ImageIO.read(new File(fname)); JLabel uLabel…
Undo
  • 1,165
  • 2
  • 10
  • 15
0
votes
2 answers

Does panel in JLayeredPane change if it is editted after being added to the JLayeredPane?

After adding a JPanel to a JLayeredPane using layeredPane.add(panel); After adding this if we change the panel does the panel in the JLayeredPane also change?
saviok
  • 497
  • 1
  • 6
  • 14
-1
votes
2 answers

add in front of last internalFrame

I am using Java Swing. I am adding internal frames with the help of menus in layered pane. Whenever a new layer (another new internal frame) is added in it, it goes to the back of all frames. Can you please tell me how to bring the newly added…
DJ'
  • 1,760
  • 1
  • 13
  • 26
-1
votes
1 answer

Memory leak while scaling image as background in java swing

So, I'm trying to write a function to scale an image and use it as the background, but it allocates a lot of memory and after a few seconds the out of memory exception is raised. Here's the function that is inside an infinite loop. public static…
Frank-py
  • 3
  • 2
-1
votes
1 answer

Extended JLabel class not showing in layered pane

In my function called create() i am trying to instanciate an object of class note, which is an extention of JLabel. I then want to add this object to a JLayeredPane (known as lp) at depth 1, in order to show it above my background image.…
-1
votes
1 answer

Typecast String to JLayeredPane

Is there a way to typecast String type to JLayeredPane? Following is the code I am using: private static void build_tables() { String sql="SELECT * FROM pos_tables WHERE pos_company_id='" +global_variables.company_id +"' AND…
Deepak
  • 6,684
  • 18
  • 69
  • 121
-1
votes
1 answer

JAVA Can we overlap objects between NORTH and SOUTH in JPanel with BorderLayout?

I have JTabbedPane, one of its tabs contain JPanel with BorderLayout (one JPanel in NORTH for menu-like itmes, quite narrow height of cca. 50px + one JPanel that contians JScrollPane in SOUTH for the content which is quite tall). When I click on one…
theoneiam
  • 11
  • 6
1 2 3
18
19