Positioning a JPanel in a JFrame at specific position
I need an help for positioning a JPanel in a specific position into a Jframe. I have a JPanel in a class who extends JFrame, and I need to put this JPanel in a specific x,y position. It's something like this: public class Frame extends JFrame { public Frame(){ this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setLocation(250, 250); this.setSize(300,300); this.setVisible(true); JPanel panel = new JPanel(); this.add(panel); panel.setLocation(150, 150); panel.add(new JButton("Hello!")); // just to show JPanel }//Frame() }//Frame I don't need a LayoutManager for the position of the JPanel,