Hello,
my Application has different Windows (e.g. one Mainwindow and one to import Data with a JDBC Source).
I've read that I should create a NIB File for each Window. But I just don't know if this is the right way and how I can call the 2. Window to open using the NIB File.
For Example I habe 2 Dialogs with 2 Controlling-Classes:
MainControl.java : Window Main
ImportControl.java : Window Import.
I know that I should initialize the Window and then call the setFrame method, but how do I link my ImportController to the right Window?
I tried the following Classes but it don't work!
public class ImportController extends NSObject {
NSPanel window; // is linked to the NSPanel
public void show() {
window.setFrame(new NSRect (0,0,500,500), true);
}
}
And the Controller of the Mainwindow calls:
ImportController myImportController = new ImportController();
myImportController.show();
But I always get an java.lang.NullPointerException (in the setFrame Line).
What's wrong?
Thanks in Advance
Mark