Ciao netarrow
ho letto in giro sulla guida di eclipse che quando si esegue un'applicazione col java bean il compilatore crea automaticamente una sorta di main che utilizza x lanciare l'applicazione.
Se inserisco il metodo main, infatti, ricevo un altro errore che mi segnala la presenza appunto del metodo main stesso.
Ho trovato in rete inoltre qs post:
That's not an error. That is simply a message to tell you that the Java Bean Application Launcher used the null constructor of your class to start it. That means your class was not a standard AWT/Swing subclass so it couldn't figure out a nicer way of starting it (like it would if it was a JFrame or a JPanel). We give this info because often when starting with the null constructor nothing visual happens and people get confused and don't realize it actually ran because the console would be empty.
When you actually write your application with its own main and use your class then this message won't show because the code that produces it won't be in your application.
In realtà io ho usato come contenitore principale non il solito JFrame ma un JInternalFrame e, non avendo esteso la sua classe come di solito si fa per il JFrame, non ho istanziato attraverso il metodo costruttore (super) le sue var. di istanza.
Credo a qs punto che quel msg lo ricevo proprio x questo motivo.
Mi domando allora se x creare un GUI bisogna usare come contenitore di base su cui appoggiare tutti gli altri controlli per forza un Frame o JFrame?
Ultima modifica effettuata da Java5 il 26/10/2009 alle 10:38 |