making java SingleFrameApplication to appear second
- by Karel Bílek
Sorry if this question will sound too chaotic, feel free to edit it.
I have an application made entirely in netbeans, which uses SingleFrameApplication and auto-generated the GUI code, named "MyApp", and FrameView, named "MyView". Now, the MyApp somehow has the main() function, but the MyView has all the graphic elements..
I don't entirely understand how that happens, so used it as black box (it somehow created the window, I didn't have to care why). But now, I need the window to be only a window, opened by another JFrame. I don't know, how to accomplish that.
MyApp, which is extending SingleFrameApplication, have these methods:
public class MyApp extends SingleFrameApplication {
@Override protected void startup() {
show(new MyView(this));
}
@Override protected void configureWindow(java.awt.Window root) {
}
public static MyApp getApplication() {
return Application.getInstance(MyApp.class);
}
public static void main(String[] args) {
launch(MyApp.class, args);
}
}
MyView has these methods:
public class MyView extends FrameView {
public MyView(SingleFrameApplication app) {
super(app);
initComponents();
}
private void initComponents() {
//all the GUI stuff is somehow defined here
}
}
Now, I have no clue how the two classes work, I just want this window, defined in MyView, to appear after another window, "ordinary" JFrame. How can I call this MyApp/MyView?