Search code examples
javanetbeansjframejlabeldesigner

How to set JLabel over(in) JLabel in Netbeans only using designer


Can you tell me please how to put Jlabel over/in another JLabel, but only using Netbeans designer. I make new form, drag 1st JLabek into it, i set icon (background image), and now I want to drag new JLabel to be shown over 1st JLabel.

I need just a tip now to do this in designer. I have a code for this, but as I said i would like to know is it possible to do with designer

thanx


Solution

  • Yes, actually you can do it pretty easy with designer BUT you're going to need JPanel with null layout

    1. Create form using netbeans (right click on package, new - JFrame Form...
    2. Drag and drop panel
    3. MOST IMPORTANT: right click on panel from navigator -set Layout -null Layout
    4. now you can drag and drop your labels and put it one on another