How to seperate GUI from Program logic?
Hi,
I have a JApplet , which needs to consist of Menubar, ToolBar , JPanel (to draw objects) and Status Bar.
I made seperate java classes for toolBar.java , panel.java and statusBar.java.
Menubar was added directly on the JApplet
I integrated them in Main JApplet as
publicclass NewJAppletextends javax.swing.JApplet{
/** Initializes the applet NewJApplet */
publicvoid init(){
try{
java.awt.EventQueue.invokeAndWait(new Runnable(){
publicvoid run(){
initComponents();// Creates Menu Bar
getContentPane().add(new Toolbar());
getContentPane().add(new Panel());
getContentPane().add(new Statusbar());
}
});
}catch (Exception ex){
ex.printStackTrace();
}
}
}
But this does not work, Only i see is menubar.
I dont understand what is missing,
Thanks

