H
huri
Gast
moin,
ich habe irgendwie ein problem!
ich erstell ein projekt->alles ok
ich erstell ein klasse->alles ok
nun erstell ich eine sShell (fenster) und es sieht so aus:
WARNUNG: "the method createSShell from the type gggg (projektname) is never used locally"
aber er führt das programm aus. sogar wenn ich das "public static void main(String[] args)" rausnehme!! kann mir das mal bitte einer erläutern??ich dachte man brauch die main, und warum wird createshell niemals local benutzt??nur global??versteh ich irgendwie nicht, besser garnicht
mfg huri
ich habe irgendwie ein problem!
ich erstell ein projekt->alles ok
ich erstell ein klasse->alles ok
Code:
public class g {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
nun erstell ich eine sShell (fenster) und es sieht so aus:
Code:
import org.eclipse.swt.widgets.Shell;
public class gggg {
private Shell sShell = null; // @jve:decl-index=0:visual-constraint="210,100"
/**
* This method initializes sShell
*
*/
private void createSShell() { //HIER IST EINE WARNUNG!!
sShell = new Shell();
sShell.setSize(new org.eclipse.swt.graphics.Point(397,270));
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
WARNUNG: "the method createSShell from the type gggg (projektname) is never used locally"
aber er führt das programm aus. sogar wenn ich das "public static void main(String[] args)" rausnehme!! kann mir das mal bitte einer erläutern??ich dachte man brauch die main, und warum wird createshell niemals local benutzt??nur global??versteh ich irgendwie nicht, besser garnicht
mfg huri