menu kommer ikke frem
Hej hvad gør jeg forkert min menu kommer ikke fremimport java.io.*;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.*;
/** A class to control the GUI
*/
public class SimGui {
public SimGui() {
try {
jbInit();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
//here some outputfile specs.
static String file ;
static FileWriter fw ;
static BufferedWriter bw ;
static PrintWriter outFile;
static JMenuBar jMenuBar1 = new JMenuBar();
static JMenu jMenu1 = new JMenu();
public static void main(String[] args) throws IOException {
file = "results.txt";
fw = new FileWriter(file);
bw = new BufferedWriter(fw);
outFile = new PrintWriter(bw);
SimulationFrame frame = new SimulationFrame("Lager simulation.", outFile);
frame.display();
}
private void jbInit() throws Exception {
jMenu1.setText("test");
jMenuBar1.add(jMenu1);
}
}
