I have a question from swing, I have two forms, the first form is for MDI and the second form is for login,
I want when a user enters password and username correct, user can login to MDI‘s form. MDI form use of jform
and login form use of jinternalframe
, I define JDesktopPane
and add login to this, but I want to use button in jframe
(MDI form) , when I add button to JDesktopPane
, it can add but I cannot set location of my button.
Please help me how can set location of my jinternalframe
and button?
This is my code:
Login frame = new Login();
frame.setVisible(true);
desktop=new JDesktopPane();
desktop.add(frame,BorderLayout.CENTER);
setContentPane(desktop);
frame.setSelected(true);
frame.setLocation(500, 200);
FlowLayout flo = new FlowLayout();
desktop.setLayout(flo);
JButton buttonSaveCustumer = new JButton("Create Customer");
buttonSaveCustumer.setLocation(70, 80);
this.add(buttonSaveCustumer);
Best Regards