I know that there are already very similar questions to my question on stackoverflow, but neither one of them answers my question. I want to put my JButton on a specific locatio
If you want to put the item into a specific coordinate you have to use null Layout:
Example:
public void newClass(){
public newClass(){
JPanel panel = new JPanel();
JButton button = new JButton("button1");
panel.setLayout(null);
button.setBounds(x,y,X,Y);
panel.add(button);
}
public static void main(String[] args){
newClass();
}
}
Doing Without a Layout Manager (Absolute Positioning)