how can I do this? for example, I have two clases
one called Main (a JFrame) where I want to put a menu bar, and another class called Elements (a JFrame) where my menubar with the menu items is located
I tried calling from Main
Elements el = new Elements();
el.initiate();
and in Elements:
public void initiate() {
initComponents();
}
I know this doesn't work, do I need to copy all the stuff from Generated Code in Elements and add it to the initiate() method in Elements and call it from an instance in Main?