I have a JLayeredPane 'lp' which contains a JPanel 'p' with a JLabel 'l' on it.
If the label is clicked then I print out the message 'label1 was clicked' and then add another JPanel 'p2' to the...
Type: Posts; User: javaAllDay
I have a JLayeredPane 'lp' which contains a JPanel 'p' with a JLabel 'l' on it.
If the label is clicked then I print out the message 'label1 was clicked' and then add another JPanel 'p2' to the...
After hours of frustrated debugging, I finally somehow made it work correctly. What I did was I added SwingUtilities.invokeLater() method and passed the code inside it like this..
case...
I have a JLayeredPane and it contains a JPanel to start with. Now I want another smaller JPanel to display on top of the previous JPanel inside the JLayeredPane dynamically. By dynamically I mean...