Skip to main content

Naming Swing Application framework application using Netbeans

No replies
cisumma
Offline
Joined: 2011-10-20
Points: 0

Hello all.
Please find attached a picture of how my db Jdesktop desktop application created with netbeans using an apache derby database opens.

I use the Swing App Framework to display the startup and login of the app. Other than that the app was coded using the Netbeans IDE using the MVC2 model.

My question concerns an error that I have been receiving since I started using this as
The way the App creates the db and how to Login to the Jdesktop app.

The Swing App frame work is working beautifully as a front door if you will.
However I have always received this error:

I am not sure where to start to fix this. The error point to this code in the MusicSystemsApp.java

</p>
<p>

show(new MusicSystemsView(this));
<br />
run:<br />
 --> in public static void main([Ljava.lang.String;@ca0b6) var: String[] args: <--</p>
<p>Oct 20, 2011 5:13:43 AM org.jdesktop.application.ResourceManager getApplicationResourceMap<br />
WARNING: getApplicationResourceMap(): no Application class<br />
 --> in public GmInstallDesktopView(MusicSystemsApp) var: (SingleFrameApplication app<--</p>
<p>key<br />
CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
 : : caller<br />
--->: CreateSystemFolders.triggerList() : var: triggerLbl.getText() <-----</p>
<p>CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
 : : triggerLbl.getText() :</p>
<p>Oct 20, 2011 5:13:43 AM org.jdesktop.application.SingleFrameApplication initRootPaneContainer<br />
WARNING: couldn't restore sesssion [mainFrame.session.xml]<br />
java.lang.NullPointerException<br />
        at org.jdesktop.application.LocalStorage.getApplicationId(LocalStorage.java:195)<br />
        at org.jdesktop.application.LocalStorage.getDirectory(LocalStorage.java:234)<br />
        at org.jdesktop.application.LocalStorage$LocalFileIO.openInputFile(LocalStorage.java:330)<br />
        at org.jdesktop.application.LocalStorage.openInputFile(LocalStorage.java:76)<br />
        at org.jdesktop.application.LocalStorage.load(LocalStorage.java:138)<br />
        at org.jdesktop.application.SessionStorage.restore(SessionStorage.java:382)<br />
        at org.jdesktop.application.SingleFrameApplication.initRootPaneContainer(SingleFrameApplication.java:231)<br />
        at org.jdesktop.application.SingleFrameApplication.show(SingleFrameApplication.java:463)<br />
        at view.MusicSystemsApp.startup(MusicSystemsApp.java:30)<br />
        at view.main.Main.main(Main.java:154)<br />
 --> in public void doInstall() throws IOException { var: xxxxxxxxx : xxxxxxxx<--</p>
<p>CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
 --> in public void doInstall() throws IOException { var: xxxxxxxxx : xxxxxxxx<--<br />
 : : caller<br />
--->: installer.execute() : var: installer.execute() <-----</p>
<p>key<br />
CLASS<br />
 public class GmInstallDesktopView extends FrameView {:</p>
<p>CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
 : : caller<br />
--->: CreateSystemFolders.triggerList(Database Connected) : var: triggerLbl.getText() <-----</p>
<p>CLASS<br />
 public class GmInstallDesktopView extends FrameView {:<br />
 : Database Connected: triggerLbl.getText() :</p>
<p> --> in public static void login() var: xxxxxxxxx : xxxxxxxx<--</p>
<p> --> in public LoginPanel() var: xxxxxxxxx : xxxxxxxx<--</p>
<p> --> in public void login() var: xxxxxxxxx : xxxxxxxx<--</p>
<p>

It does not seem to effect performance yet I would like to set the app name.
Here is some resources I have altered to get the app to work and somehow I have
Stepped on some properties that are responsible for this error.
Could someone tell me how to fix this?
Thanks

Main.java

</p>
<p>public static void main(String[] args) throws IOException{</p>
<p>        MusicSystemsApp start = new MusicSystemsApp();<br />
        start.startup();</p>
<p>    }<br />

MusicSystemsApp.java
//this is where the error points to:

<br />
// show(new MusicSystemsView(this));<br />

</p>
<p>/*<br />
 * MusicSystemsApp.java<br />
 */</p>
<p>package view;</p>
<p>import java.io.FileNotFoundException;<br />
import java.io.IOException;<br />
import java.sql.SQLException;<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;<br />
import model.err.LoginException;<br />
import model.err.ProfileException;<br />
import org.jdesktop.application.Application;<br />
import org.jdesktop.application.SingleFrameApplication;</p>
<p>/**<br />
 * The main class of the application.<br />
 */<br />
public class MusicSystemsApp extends SingleFrameApplication {</p>
<p>    /**<br />
     * At startup create and show the main frame of the application.<br />
     */<br />
    @Override public void startup() {<br />
        try {<br />
            MusicSystemsView.setOwner(getMainFrame());<br />
            show(new MusicSystemsView(this));<br />
            MusicSystemsView.doInstall();<br />
        } catch (FileNotFoundException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (InterruptedException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (IOException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);</p>
<p>        } catch (SQLException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (ProfileException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (LoginException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        }</p>
<p>    }</p>
<p>    /**<br />
     * This method is to initialize the specified window by injecting resources.<br />
     * Windows shown in our application come fully initialized from the GUI<br />
     * builder, so this additional configuration is not needed.<br />
     */<br />
    @Override public void configureWindow(java.awt.Window root) {<br />
    }</p>
<p>    /**<br />
     * A convenient static getter for the application instance.<br />
     * @return the instance of MusicSystemsApp<br />
     */<br />
    public static MusicSystemsApp getApplication() {<br />
        return Application.getInstance(MusicSystemsApp.class);<br />
    }</p>
<p>    /**<br />
     * Main method launching the application.<br />
     */</p>
<p>}</p>
<p>

</p>
<p>/*<br />
 * MusicSystemsApp.java<br />
 */</p>
<p>package view;</p>
<p>import java.io.FileNotFoundException;<br />
import java.io.IOException;<br />
import java.sql.SQLException;<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;<br />
import model.err.LoginException;<br />
import model.err.ProfileException;<br />
import org.jdesktop.application.Application;<br />
import org.jdesktop.application.SingleFrameApplication;</p>
<p>/**<br />
 * The main class of the application.<br />
 */<br />
public class MusicSystemsApp extends SingleFrameApplication {</p>
<p>    /**<br />
     * At startup create and show the main frame of the application.<br />
     */<br />
    @Override public void startup() {<br />
        try {<br />
            MusicSystemsView.setOwner(getMainFrame());<br />
            show(new MusicSystemsView(this));<br />
            MusicSystemsView.doInstall();<br />
        } catch (FileNotFoundException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (InterruptedException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (IOException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);</p>
<p>        } catch (SQLException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (ProfileException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        } catch (LoginException ex) {<br />
            Logger.getLogger(MusicSystemsApp.class.getName()).log(Level.SEVERE, null, ex);<br />
        }</p>
<p>    }</p>
<p>    /**<br />
     * This method is to initialize the specified window by injecting resources.<br />
     * Windows shown in our application come fully initialized from the GUI<br />
     * builder, so this additional configuration is not needed.<br />
     */<br />
    @Override public void configureWindow(java.awt.Window root) {<br />
    }</p>
<p>    /**<br />
     * A convenient static getter for the application instance.<br />
     * @return the instance of MusicSystemsApp<br />
     */<br />
    public static MusicSystemsApp getApplication() {<br />
        return Application.getInstance(MusicSystemsApp.class);<br />
    }</p>
<p>    /**<br />
     * Main method launching the application.<br />
     */</p>
<p>}<br />

</p>
<p># Application global resources</p>
<p>Application.name = gmInstallDesktop<br />
Application.title = Guitar Master Application<br />
Application.version = 1.0<br />
Application.vendor = Music Systems Inc.<br />
Application.homepage = <a href="mailto:ceyesumma@hotmail.com">ceyesumma@hotmail.com</a><br />
Application.description = A music theory learning system for guitar.<br />
Application.vendorId = ceyesumma<br />
Application.id = gmInstallDesktop<br />
Application.lookAndFeel = javax.swing.plaf.metal.MetalLookAndFeel<br />
[code]</p>
<p>[code]</p>
<p># @Action resources</p>
<p>showAboutBox.Action.text = &About...<br />
showAboutBox.Action.shortDescription = Show the application's information dialog</p>
<p># status bar resources</p>
<p>StatusBar.messageTimeout = 5000<br />
StatusBar.busyAnimationRate = 30<br />
StatusBar.idleIcon = busyicons/idle-icon.png<br />
StatusBar.busyIcons[0] = busyicons/busy-icon0.png<br />
StatusBar.busyIcons[1] = busyicons/busy-icon1.png<br />
StatusBar.busyIcons[2] = busyicons/busy-icon2.png<br />
StatusBar.busyIcons[3] = busyicons/busy-icon3.png<br />
StatusBar.busyIcons[4] = busyicons/busy-icon4.png<br />
StatusBar.busyIcons[5] = busyicons/busy-icon5.png<br />
StatusBar.busyIcons[6] = busyicons/busy-icon6.png<br />
StatusBar.busyIcons[7] = busyicons/busy-icon7.png<br />
StatusBar.busyIcons[8] = busyicons/busy-icon8.png<br />
StatusBar.busyIcons[9] = busyicons/busy-icon9.png<br />
StatusBar.busyIcons[10] = busyicons/busy-icon10.png<br />
StatusBar.busyIcons[11] = busyicons/busy-icon11.png<br />
StatusBar.busyIcons[12] = busyicons/busy-icon12.png<br />
StatusBar.busyIcons[13] = busyicons/busy-icon13.png<br />
StatusBar.busyIcons[14] = busyicons/busy-icon14.png<br />
doInstall.Action.shortDescription=<br />
doInstall.Action.text=<br />
installMenuItem.text=Install<br />
fileMenu.text=File<br />
gmSplashLabel.text=<br />
#NOI18N<br />
gmSplashLabel.icon=gmSplash.png<br />
triggerLbl.text=<br />
helpMenu.text=Help</p>
<p>

H

AttachmentSize
app_framework_error_question.doc1.5 MB