# Programm "fehlerhaft" als .jar



## java Novize (2. Dez 2016)

Guten Tag,

ich arbeite an einem in Java programmierten kleinen 2d Spiel was derzeit ausschließlich Swing zur Grafischen Darstellung verwendet. Um vom Menü ins eigentliche Spiel zu kommen benutze ich ein Panel welches ich dem JFrame hinzufüge. Das Spiel läuft einwandfrei und alles ist so wie gewollt.

"Generiere" ich mir dann die .jar Datei per Eclipse und starte das Programm komme ich ins Menü kann aber das Spiel nicht starten, weil das Panel nicht dem JFrame hinzugefügt wird (zumindest macht das den Eindruck als wäre es so).

Bei der .jar handelt es sich natürlich um den genau gleichen Code wie der in Eclipse ausgeführte code.

Da ich in meinem Spiel eine Konsole implementiert habe konnte ich durch syso("Test") herausfinden das, dass Programm ab dem Aufruf (in rot markiert) förmlich einfriert. Wobei das ausschließlich in der .jar Version passiert.


Code für den Aufruf:


```
JDesktopPane dtp = new JDesktopPane();
//...
dtp.add(RenderWindow.RenderWindow1());  //RenderWindow1() gibt ein JInternalFrame zurück
//...
// Beschreibung zum Aufruf: Ich füge dem JInternalframe was ich von getRenderWindow1()  bekomme ein  JPanel aus Panel1 hinzu.
RenderWindow.getRenderWindow1().add(Panel1.Panels(), BorderLayout.CENTER);
```
RenderWindow.getRenderWindow1().add(Panel1.Panels(), BorderLayout.CENTER);
Hat vielleicht jemand Erfahrung mit einem ähnlichen Problem gemacht?

MfG.

Java Novize


----------



## Thallius (2. Dez 2016)

An dem Code liegt es sicherlich nicht. Da must du uns schon mehr zeigen.

Lädst du irgendwo Bilder oder andere Dateien aus einem Pfad?


----------



## java Novize (2. Dez 2016)

ja das ist richtig auf dem Panel welches geladen wird sind diverse Bilder.

nur um zu verdeutlichen was ich meine:

per eclipse ausgeführt (nach erstellung eines Projektes, konfigurierung usw. )









per .jar ausgeführt (gerade nach erstellen des Projektes bzw. beim Druck auf den "Create" Button)







WindowMain
---

```
public class WindowMain extends JFrame implements ActionListener{

   private static final long serialVersionUID = 1L;

   JMenu menu, submenu, submenu2;
   JButton button1, button2, button3, button4, button5, button6;
   JMenuItem menuItem, menuItem2, menuItem3, menuItem4, menuItem5, menuItem6, menuItem7, setWorkspace, Options, Lookandfeel, keyView, performance, start3, start4, start5, start6;
   JLabel label1, label2, label3, label4, label5, label6, label7, label8;
   JCheckBox boxDLeft, boxULeft, boxDRight, boxURight;
   JRadioButtonMenuItem rbMenuItem;
   JCheckBoxMenuItem cbMenuItem;
   JCheckBox box1, box2, box3;
   public static JSlider perfromance1, quality1;

   boolean renderWindow = false, anlegen = false;
   static String[] paintMode = {"None", "Tile", "Anim", "Player"};
   static String[] paintColor = {"White","Black","Alpha"};
   int KeyVeiwXSize = 300, KeyVeiwYSize = 170, perf = 0, options = 0;
   public static JSpinner model2 = new JSpinner();
   public static JSpinner model3 = new JSpinner();
   public static JSpinner model1 = new JSpinner();
   int[][] intPosArrLoad;
   public static Image[][] ImgArrayLoad, ImgArrayLoad2;
   public static String[][] ID_ArrayLoad, ID_ArrayLoad2;
   JFrame frame, frame1;
   JScrollPane scroll;
   public static JTextField field1 = new JTextField();
   public static String title, Type, GamefolderCurrent;
   String[] gameTypes = {"Jump & Run","RPG","Arcade", "Space Sim","Tabeltop","from Scratch",""};
   Positiontools tools = new Positiontools();
   JDesktopPane dtp;
   Variables vars;
   JComboBox gameType;
   public static int spdY;
   public static int spdX;

   static int tileSizeLoad;


   public WindowMain(){
 
     vars = new Variables();
     dtp = new JDesktopPane();
     JMenuBar mb = new JMenuBar();
     JMenu fm = new JMenu("File");
     JMenu ed = new JMenu("Edit");
     JMenu op = new JMenu("Options");
     JMenu st = new JMenu("Start");
     submenu = new JMenu("Render_Window");
     submenu2 = new JMenu("Start");
     menuItem5 = new JMenu("Workspace...");

     setTitle("2DT engine V. 0.1.3");
     setBounds(0, 0, tools.getScreenSizeX(), tools.getScreenSizeY());
     setDefaultCloseOperation(EXIT_ON_CLOSE);
     setLayout(new BorderLayout());
     setContentPane(dtp);
     setResizable(false);
 
     Image icon = Toolkit.getDefaultToolkit().getImage("Textures\\Logo.png");
     setIconImage(icon);
 
     dtp.setLayout(null);
     setJMenuBar(mb);
 
     menuItem = new JMenuItem("Create new Project", new ImageIcon("Textures\\NEW_PROJECT.png"));
     start3 = new JMenuItem("Paint Mode");
     start3.addActionListener(this);
     start4 = new JMenuItem("Conways game of life");
     start4.addActionListener(this);
     start6 = new JMenuItem("Langton's Ant");
     start6.addActionListener(this);
     start5 = new JMenuItem("Exit all frames");
     start5.addActionListener(this);
     menuItem.addActionListener(this);
     menuItem2 = new JMenuItem("Save Project", new ImageIcon("Textures\\SAVE_PROJECT.png"));
     menuItem2.addActionListener(this);
     menuItem3 = new JMenuItem("Load Project", new ImageIcon("Textures\\LOAD_PROJECT.png"));
     menuItem3.addActionListener(this);
     menuItem6 = new JMenuItem("Recent Projects", new ImageIcon("Textures\\RECENT_PROJECT.png"));
     menuItem7 = new JMenuItem("Exit", new ImageIcon("Textures\\EXIT.png"));
     menuItem7.addActionListener(this);
     menuItem4 = new JMenuItem("Refresh", new ImageIcon("Textures\\REFRESH_PROJECT.png"));
     setWorkspace = new JMenuItem("change Workspace", new ImageIcon("Textures\\WORKSPACE.png"));
 
     Options = new JMenuItem("Options", new ImageIcon("Textures\\OPTIONS.png"));
     Options.addActionListener(this);
     keyView = new JMenuItem("KeyViewer", new ImageIcon("Textures\\key.png"));
     performance = new JMenuItem("performance", new ImageIcon("Textures\\performance.png"));
     keyView.addActionListener(this);
     performance.addActionListener(this);
     Lookandfeel = new JMenuItem("Look and feel", new ImageIcon("Textures\\LOOKANDFEEL.png"));
 
     menuItem5.add(setWorkspace);
 
     submenu2.add(start3);
     submenu2.add(start4);
     submenu2.add(start6);
     submenu2.add(start5);
     submenu.add(keyView);
     submenu.add(performance);
 
     fm.add(menuItem);
     fm.add(menuItem2);
     fm.add(menuItem3);
     fm.add(menuItem6);
     fm.add(new JSeparator());
     fm.add(menuItem4);
     fm.add(menuItem5);
     fm.add(new JSeparator());
     fm.add(menuItem7);
 
     op.add(submenu);
     st.add(submenu2);
     ed.add(Options);
     ed.add(Lookandfeel);
 
    mb.add(fm);
     mb.add(ed);
     mb.add(op);
     mb.add(st);
 
     dtp.add(directDirs.ContentWindow1());
     dtp.add(ContentWindow.ContentWindow1());
     dtp.add(ConsoleWindow.ConsoleWindow1());
     dtp.add(RenderWindow.RenderWindow1());
     dtp.add(OptionWindow.OptionWindow1());
 
     setVisible(true);
   }

   @Override
   public void actionPerformed(ActionEvent e) {

     if(e.getSource() == menuItem2){
   
       try {
     
         FileOptions.store_Id_Array1(Variables.getWorkspacePath() , field1.getText(), "layer1_ID_Array.txt");
         FileOptions.store_Id_Array2(Variables.getWorkspacePath() , field1.getText(), "layer2_ID_Array.txt");
         FileOptions.createFile(Variables.getWorkspacePath(), field1.getText(), PanelWorldTexturing.getTextureArray(), "texture_array.txt");
         FileOptions.createFile2dArray(Variables.getWorkspacePath(), field1.getText(), PanelWorldCollision.ID_Array1, "Layer1_Collision_Array.txt");
         FileOptions.createFile2dArray(Variables.getWorkspacePath(), field1.getText(), PanelWorldCollision.ID_Array2, "Layer2_Collision_Array.txt");
     
         ConsoleWindow.setConsoleInput("saved successfully!");
         JOptionPane.showMessageDialog(null, "saved successfully!");
       } catch (IOException e1) {
     
         // TODO Auto-generated catch block
         e1.printStackTrace();
         ConsoleWindow.setConsoleInput("An error occurred while saving the game");
         JOptionPane.showMessageDialog(null, "An error occurred while saving the game");
         JOptionPane.showInputDialog("An error occurred while saving the game");
       }
     }
     if(e.getSource() == menuItem3){
   
       dtp.removeAll();
       dtp.add(directDirs.ContentWindow1());
       dtp.add(ContentWindow.ContentWindow1());
       dtp.add(ConsoleWindow.ConsoleWindow1());
       dtp.add(RenderWindow.RenderWindow1());
       dtp.add(OptionWindow.OptionWindow1());
   
       String[] arr = new String[7];
       String[] arr2 = new String[6];
       int x = 0, x1 = 0, x2 = 0, x3 = 0;
       String line, line1, line2, line3;

       BufferedReader br = null;
       BufferedReader br1 = null;
       BufferedReader br2 = null;
       BufferedReader br3 = null;
       BufferedReader br4 = null;
       try {
         br = new BufferedReader(new FileReader("metadata\\starterInfo.txt"));
       } catch (FileNotFoundException e1) {
         // TODO Auto-generated catch block
         ConsoleWindow.setConsoleInput(e1.getMessage());
       }
   
       try {
         while((line = br.readLine()) != null){
           x++;
       
           arr[x] = line;
         }
       } catch (IOException e1) {
         // TODO Auto-generated catch block
         ConsoleWindow.setConsoleInput(e1.getMessage());
       }
   
       Variables.setWorkspacePath(arr[6]);
       JFileChooser chooser = new JFileChooser();
      chooser.setCurrentDirectory(new java.io.File(arr[6]+"\\2DT_Workspace"));
      chooser.setDialogTitle("Workspace selection");
      chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
      chooser.setAcceptAllFileFilterUsed(false);

      if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
     
      GamefolderCurrent = chooser.getSelectedFile().toString();
   
      } else {
      System.out.println("Nothing selected");
      }
      //---------------------------------------------------------------
      try {
         br1 = new BufferedReader(new FileReader(GamefolderCurrent+"\\gameInfo.txt"));
       } catch (FileNotFoundException e1) {
         // TODO Auto-generated catch block
         ConsoleWindow.setConsoleInput(e1.getMessage());
       }
   
       try {
         while((line1 = br1.readLine()) != null){
           x1++;
           arr2[x1] = line1;
         }
       } catch (IOException e1) {
         // TODO Auto-generated catch block
         ConsoleWindow.setConsoleInput(e1.getMessage());
       }
       //-----------------------------------------------------------------
       intPosArrLoad = new int[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))][Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))];
       ImgArrayLoad = new Image[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))][Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))];
       ID_ArrayLoad = new String[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))][Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))];
   
       tileSizeLoad = Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""));
   
       String[] arr3 = new String[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ","")) + (tileSizeLoad*2) +2];
       Image img_001;
       int l = 0;
       boolean add1 = false;
        try {
           br2 = new BufferedReader(new FileReader(GamefolderCurrent+"\\layer1_ID_Array.txt"));
         } catch (FileNotFoundException e1) {
           // TODO Auto-generated catch block
           ConsoleWindow.setConsoleInput(e1.getMessage());
         }
     
         try {
           while((line2 = br2.readLine()) != null){
             x2++;
 
             arr3[x2] = line2;
           }
         } catch (IOException e1) {
           // TODO Auto-generated catch block
           ConsoleWindow.setConsoleInput(e1.getMessage());
         }
     
      for(int i = 0; i < intPosArrLoad.length; i+=tileSizeLoad){
         for(int i1 = 0; i1 < intPosArrLoad.length; i1+=tileSizeLoad){
           l++;
           ID_ArrayLoad[i/tileSizeLoad][i1/tileSizeLoad] = arr3[l].replaceAll(",","").replaceAll(" ","").replace("src\\Panels\\Texture_for_contentBrowser\\", "");
           if(ID_ArrayLoad[i/tileSizeLoad][i1/tileSizeLoad].contains("_Collision")){
             add1 = true;
           }
           ImgArrayLoad[i1] = Toolkit.getDefaultToolkit().getImage(getClass().getResource("Texture_for_contentBrowser\\"+ID_ArrayLoad[i/tileSizeLoad][i1/tileSizeLoad].replaceAll("_Collision", "").replaceAll("\n", "") + ".png"));
           if(add1 == true){
             ID_ArrayLoad[i/tileSizeLoad][i1/tileSizeLoad] +="_Collision";
             add1 = false;
           }
         }
      }
      //-----------------------------------------------------------------
   
      ImgArrayLoad2 = new Image[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))][Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))];
       ID_ArrayLoad2 = new String[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))][Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ",""))];
       int l1 = 0;
       boolean add2 = false;
   
       String[] arr4 = new String[Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ","")) + (tileSizeLoad*2) +2];

        try {
           br3 = new BufferedReader(new FileReader(GamefolderCurrent+"\\layer2_ID_Array.txt"));
         } catch (FileNotFoundException e1) {
           // TODO Auto-generated catch block
           ConsoleWindow.setConsoleInput(e1.getMessage());
         }
     
         try {
           while((line3 = br3.readLine()) != null){
             x3++;
 
             arr4[x3] = line3;
           }
         } catch (IOException e1) {
           // TODO Auto-generated catch block
           ConsoleWindow.setConsoleInput(e1.getMessage());
         }
      for(int i = 0; i < intPosArrLoad.length; i+=tileSizeLoad){
         for(int i1 = 0; i1 < intPosArrLoad.length; i1+=tileSizeLoad ){
           l1++;
           ID_ArrayLoad2[i/tileSizeLoad][i1/tileSizeLoad] = arr4[l1].replaceAll(",","").replaceAll(" ","").replace("src\\Panels\\Texture_for_contentBrowser\\", "");
           if(ID_ArrayLoad2[i/tileSizeLoad][i1/tileSizeLoad].contains("_Collision")){
             add2 = true;
           }
           ImgArrayLoad2[i1] = Toolkit.getDefaultToolkit().getImage(getClass().getResource("Texture_for_contentBrowser\\"+ID_ArrayLoad2[i/tileSizeLoad][i1/tileSizeLoad].replaceAll("_Collision", "").replaceAll("\n", "") + ".png"));
           if(add2 == true){
             ID_ArrayLoad2[i/tileSizeLoad][i1/tileSizeLoad] +="_Collision";
             add2 = false;
           }
         }
       }
      //-----------------------------------------------------------------
   
      RenderOverlay.clearID = false;
   
      Panel1.setxGamesize(Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ",""))*tileSizeLoad);
      Panel1.setyGamesize(Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ",""))*tileSizeLoad);
      Variables.setZoom(Integer.valueOf(arr2[5].replaceAll(",","").replaceAll(" ","")));
      Panel1.tileSize = tileSizeLoad;
      Panel1.intPosArr = intPosArrLoad;
      Panel1.ID_Array = ID_ArrayLoad;
      Panel1.ImgArray = ImgArrayLoad;
      Panel2.ID_Array2 = ID_ArrayLoad2;
      Panel2.ImgArray2 = ImgArrayLoad2;
   
      field1.setText(arr2[1].replaceAll(",","").replaceAll(" ",""));
      model2.setValue(Integer.valueOf(arr2[3].replaceAll(",","").replaceAll(" ","")));
      model3.setValue(Integer.valueOf(arr2[4].replaceAll(",","").replaceAll(" ","")));
       
      RenderWindow.mboxFrame.add(Panel1.Panels(), BorderLayout.CENTER);
       OptionWindow.mboxFrame.add(OptionsPanel.Panels(), BorderLayout.CENTER);
   
       ContentWindow.getMboxFrame().add(ContentPanel.Panels(), BorderLayout.PAGE_START);
       ContentWindow.getMboxFrame().add(ContentPanelViewPort.Panels(), BorderLayout.PAGE_END);
   
       File fileStart = new File(Variables.getWorkspacePath() + "\\2DT_Workspace\\"+ field1.getText() + "\\gameInfo.txt");
       directDirs.choser.setSelectedFile(fileStart);
   
       RenderWindow.layer1.setBackground(Color.GREEN);
       RenderWindow.layer2.setBackground(Color.GREEN);
       RenderWindow.slider1.setValue(Panel1.tileSize);
       Variables.setZoom(Panel1.tileSize);
       Variables.setLayer1(true);
       Variables.setLayer2(true);
       ConsoleWindow.setConsoleInput("activate Layer1");
       ConsoleWindow.setConsoleInput("activate Layer2");
   
       ConsoleWindow.setConsoleInput("load successfully: '" + arr2[1].replaceAll(",","").replaceAll(" ","") + "' !");
       JOptionPane.showMessageDialog(null, "load successfully: '" + arr2[1].replaceAll(",","").replaceAll(" ","") + "' !");
   
       revalidate();
     }
 
     if(e.getSource() == menuItem7){
   
       System.exit(1);
     }
     if(e.getSource() == start4){
   
       dtp.removeAll();
   
       dtp.revalidate();
       dtp.updateUI();
   
       //Start
   
       dtp.add(GameOfLife.window1());
     }
     if(e.getSource() == start5){
   
       dtp.removeAll();
   
       dtp.revalidate();
       dtp.updateUI();

     }
     if(e.getSource() == start6){

       dtp.removeAll();
   
       dtp.revalidate();
       dtp.updateUI();
   
       dtp.add(Langtons_ant.window1());
   
     }
     if(e.getSource() == menuItem){
   
       JPanel panel = new JPanel();
       frame = new JFrame();        //   Start min max step
   
       gameType = new JComboBox(gameTypes);
   
       gameType.setBounds(20, 180, 100, 30);
       gameType.setSelectedIndex(6);
       gameType.addActionListener(this);
   
       panel.setBackground(Color.GRAY);
       panel.setBounds(0, 460, 400, 1);
   
       field1.setBounds(20, 30, 200, 40);
       field1.setText("");
   
       model1.setBounds(20, 80, 50, 40);
       model1.setValue(20);
   
       model2.setBounds(20, 130, 70, 40);
       model3.setBounds(150, 130, 70, 40);
   
       label1 = new JLabel("Create info_data.txt");
       label2 = new JLabel("import standard assets");
       label3 = new JLabel("Set project title");
       label4 = new JLabel("Set tile size (min. 4)");
       label5 = new JLabel("X size");
       label6 = new JLabel("Y size");
       label7 = new JLabel("Select a Game Type");
   
       frame.setTitle("Configuration");
       frame.setAlwaysOnTop(true);
       frame.setLayout(null);
       frame.setBounds(tools.getScreenSizeX() - (tools.getScreenSizeX() - (tools.getScreenSizeX() / 2) +200), tools.getScreenSizeY() - ((tools.getScreenSizeY() / 2) +200), 400, 600);
       //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       frame.setResizable(false);
       frame.setMaximumSize(getSize());
   
       button1 = new JButton("Create");
       button1.setBounds(150, 420, 100, 30);
       button1.addActionListener(this);
   
       box1 = new JCheckBox("");
       box1.setBounds(20, 480, 20, 20);
       box1.setSelected(false);
   
       box2 = new JCheckBox("");
       box2.setBounds(20, 520, 20, 20);
       box2.setSelected(false);
   
       box3 = new JCheckBox("");
       box3.setBounds(20, 320, 20, 20);
       box3.setSelected(false);
   
       label4.setBounds(230, 80, 200, 40);
       label5.setBounds(100, 130, 50, 40);
       label6.setBounds(230, 130, 50, 40);
       label3.setBounds(230, 30, 200, 40);
       label2.setBounds(230, 510, 200, 40);
       label1.setBounds(230, 470, 200, 40);
       label7.setBounds(230, 180, 250, 40);
   
       frame.add(box1);
   
       frame.add(createHorizontalSeperator());
       frame.add(box2);
       frame.add(label1);
       frame.add(createHorizontalSeperator());
       frame.add(label2);
       frame.add(model1);
       frame.add(label3);
       frame.add(label4);
       frame.add(field1);
       frame.add(panel);
       frame.add(label5);
       frame.add(label6);
       frame.add(label7);
       frame.add(button1);
       frame.add(model2);
       frame.add(model3);
       frame.add(gameType);
   
       Type = "Jump & Run";
   
       frame.setVisible(true);
     }
 
     if(button1 == e.getSource()){
   
       if(field1.getText().equals("")){
     
         ConsoleWindow.setConsoleInput("Name missing");
     
         label8 = new JLabel("Missing name!");
         label8.setForeground(Color.RED);
         label8.setBounds(20, 0, 200, 40);
     
         frame.add(label8);

         frame.repaint();
       }else{

     
         dtp.removeAll();
         dtp.revalidate();
     
         dtp.add(directDirs.ContentWindow1());
         dtp.add(ContentWindow.ContentWindow1());
         dtp.add(ConsoleWindow.ConsoleWindow1());
         dtp.add(RenderWindow.RenderWindow1());
         dtp.add(OptionWindow.OptionWindow1());
         ConsoleWindow.setConsoleInput("Hi");
         //ConsoleWindow.ladeVortschritt(120);

         anlegen = true;
     
         if(anlegen == true){
           ConsoleWindow.setConsoleInput("Hi1");
           title = field1.getText();
     
           ConsoleWindow.setConsoleInput("Hi2");
       
           RenderWindow.getMboxFrame().add(Panel1.Panels(), BorderLayout.CENTER);
           ConsoleWindow.setConsoleInput("Hi3");
           OptionWindow.getMboxFrame().add(OptionsPanel.Panels(), BorderLayout.CENTER);
//           frame.dispose();
//           dtp.revalidate();
       
           ContentWindow.getMboxFrame().add(ContentPanel.Panels(), BorderLayout.PAGE_START);
//           dtp.revalidate();
           ContentWindow.getMboxFrame().add(ContentPanelViewPort.Panels(), BorderLayout.PAGE_END);
//           dtp.revalidate();

           ConsoleWindow.setConsoleInput("Create Workfolder");
       
           if(Variables.getWorkspacePath() != null && Variables.getWorkspacePath().toString().isEmpty()){
   
             FileOptions.createFolder(Variables.getWorkspacePath(), field1.getText());
           }else{
         
             FileOptions.createFolder(FileOptions.readFile("metadata\\starterInfo.txt", 6), field1.getText());
             Variables.setWorkspacePath(FileOptions.readFile("metadata\\starterInfo.txt", 6));
         
             String[] gameInfo = {title, gameType.getName(), model2.getValue().toString(), model3.getValue().toString(), model1.getValue().toString()};
         
             try {
               FileOptions.createFile(Variables.getWorkspacePath() , field1.getText(), gameInfo, "gameInfo.txt");
             } catch (IOException e1) {
               // TODO Auto-generated catch block
               e1.printStackTrace();
             }
             File fileStart = new File(Variables.getWorkspacePath() + "\\2DT_Workspace\\"+ field1.getText() + "\\gameInfo.txt");
             directDirs.choser.setSelectedFile(fileStart);
           }
   
           directDirs.setWorkspacePath(Variables.getWorkspacePath() + "\\2DT_Workspace");
       
           ConsoleWindow.setConsoleInput("Type:\t" + gameType.getName());
           ConsoleWindow.setConsoleInput("Title:\t" + field1.getText());
           ConsoleWindow.setConsoleInput("X size:\t" + model2.getValue().toString());
           ConsoleWindow.setConsoleInput("Y size:\t" + model3.getValue().toString());
           ConsoleWindow.setConsoleInput("Project created successfully...");

           RenderWindow.layer1.setBackground(Color.GREEN);
           RenderWindow.layer2.setBackground(Color.GREEN);
           RenderWindow.slider1.setValue(Panel1.tileSize);
           Variables.setZoom(Panel1.tileSize);
           Variables.setLayer1(true);
           Variables.setLayer2(true);
           ConsoleWindow.setConsoleInput("activate Layer1");
           ConsoleWindow.setConsoleInput("activate Layer2");
       
           revalidate();
       
           vars.setTileSize(Integer.valueOf(model1.getValue().toString()));
       
           renderWindow = true;
     
           frame.setVisible(false);
         }else{
       
           ConsoleWindow.setConsoleInput("fatal error");
         }
       }
     }
     if(button2 == e.getSource()){
   
       ConsoleWindow.setConsoleInput("Starting Key Viewer");
       RenderOverlay.keys = true;
       frame1.setVisible(false);
     }
     if(Options == e.getSource()){
   
       options++;
   
       if(options == 1){
     
         OptionsPanel.panel.setVisible(false);
         OptionWindow.mboxFrame.remove(OptionsPanel.panel);
//         OptionWindow.mboxFrame.removeAll();
         OptionWindow.mboxFrame.add(ToolOptionsWindow.Panels(), BorderLayout.CENTER);
         OptionWindow.mboxFrame.revalidate();
         Options.setIcon(new ImageIcon("Textures\\OPTIONS_activ.png"));
     
       }else{
     
         ToolOptionsWindow.panel.setVisible(false);
         OptionWindow.mboxFrame.remove(ToolOptionsWindow.panel);
         OptionWindow.mboxFrame.add(OptionsPanel.Panels(), BorderLayout.CENTER);
         OptionWindow.mboxFrame.revalidate();
         Options.setIcon(new ImageIcon("Textures\\OPTIONS.png"));
     
         options = 0;
       }
   
     }
     if(boxDLeft == e.getSource()){
   
       boxULeft.setSelected(false);
       boxDRight.setSelected(false);
       boxURight.setSelected(false);
       RenderOverlay.setKeyCorner(4);
     }
     if(boxDRight == e.getSource()){

       boxULeft.setSelected(false);
       boxDLeft.setSelected(false);
       boxURight.setSelected(false);
       RenderOverlay.setKeyCorner(3);
     }
     if(boxULeft == e.getSource()){

       boxDLeft.setSelected(false);
       boxDRight.setSelected(false);
       boxURight.setSelected(false);
       RenderOverlay.setKeyCorner(1);
     }
     if(boxURight == e.getSource()){

       boxULeft.setSelected(false);
       boxDRight.setSelected(false);
       boxDLeft.setSelected(false);
       RenderOverlay.setKeyCorner(2);
     }
     if(start3 == e.getSource()){
   
       button3 = new JButton("SAVE");
       button3.setIcon(new ImageIcon("Textures\\SAVE_PROJECT.png"));
       button3.setFocusable(false);
       button3.setFocusTraversalKeysEnabled(false);
       button3.addActionListener(new ActionListener(){
         @Override
         public void actionPerformed(ActionEvent e) {
           // TODO Auto-generated method stub
       
         }
       });
       button4 = new JButton("LOAD");
       button4.setIcon(new ImageIcon("Textures\\LOAD_PROJECT.png"));
       button4.setFocusable(false);
       button4.setFocusTraversalKeysEnabled(false);
       button4.addActionListener(new ActionListener(){
         @Override
         public void actionPerformed(ActionEvent e) {
           // TODO Auto-generated method stub
       
         }
       });
       button5 = new JButton("NEW");
       button5.setIcon(new ImageIcon("Textures\\NEW_PROJECT.png"));
       button5.setFocusable(false);
       button5.setFocusTraversalKeysEnabled(false);
       button5.addActionListener(new ActionListener(){
         @Override
         public void actionPerformed(ActionEvent e) {

   
         }
       });
   
       RenderWindow.getMboxFrame().setVisible(false);
       ConsoleWindow.getMboxFrame().setVisible(false);
       ContentWindow.getMboxFrame().setVisible(false);
       OptionWindow.getMboxFrame().setVisible(false);
   
       for(MouseListener listener : ((javax.swing.plaf.basic.BasicInternalFrameUI) ContentWindow.getMboxFrame().getUI()).getNorthPane().getMouseListeners()){
         ((javax.swing.plaf.basic.BasicInternalFrameUI) ContentWindow.getMboxFrame().getUI()).getNorthPane().removeMouseListener(listener);
       }

       dtp.add(PaintWindow.Paintwindow1());
       dtp.add(PaintOptionWindow.OptionWindow1());
   
     }
 
     if(performance == e.getSource()){
   
       if(renderWindow == true){
         perf++;
     
         if(perf == 1){
       
   
         }else{
       
       
          perf = 0;
         }
       }
     }
     if(keyView == e.getSource()){
   
       if(renderWindow == true){
     
         button2 = new JButton("Ok");
         ConsoleWindow.setConsoleInput("Starting Key Viewer");
     
         boxDLeft = new JCheckBox();
         boxDLeft.setLocation(20, 128);
         boxDLeft.setSize(20, 20);
         boxDLeft.setBackground(Color.WHITE);
         boxDLeft.addActionListener(this);
     
         boxULeft = new JCheckBox();
         boxULeft.setLocation(20, 24);
         boxULeft.setSize(20, 20);
         boxULeft.setBackground(Color.WHITE);
         boxULeft.addActionListener(this);
     
         boxDRight = new JCheckBox();
         boxDRight.setLocation(260, 24);
         boxDRight.setSize(20, 20);
         boxDRight.setBackground(Color.WHITE);
         boxDRight.addActionListener(this);
     
         boxURight = new JCheckBox();
         boxURight.setLocation(260, 128);
         boxURight.setSize(20, 20);
         boxURight.setBackground(Color.WHITE);
         boxURight.addActionListener(this);
     
         button2.setBounds(120, 65, 50, 30);
         button2.addActionListener(this);
     
         frame1 = new JFrame();
         JLabel label = new JLabel(new ImageIcon("Textures\\KeyViewBackground.png"));
     
         label.add(button2);
         label.setLocation(0, -14);
         label.setSize(KeyVeiwXSize, KeyVeiwYSize);
         label.setLayout(null);
     
         frame1.setTitle("Key View Selection");
         frame1.setBounds((Positiontools.getScreenSizeX() / 2) - (KeyVeiwXSize / 2), (Positiontools.getScreenSizeY() / 2) - (KeyVeiwYSize / 2) ,KeyVeiwXSize, KeyVeiwYSize);
         frame1.setResizable(false);
         frame1.setLayout(null);
         frame1.setAlwaysOnTop(true);
 
     
         label.add(boxDLeft);
         label.add(boxDRight);
         label.add(boxULeft);
         label.add(boxURight);
     
         frame1.add(label);
     
         frame1.setVisible(true);
       }else{
     
         ConsoleWindow.setConsoleInput("Error(Render Window is not active)");
         JOptionPane.showInternalMessageDialog(dtp, "error", "Render Window is not active!", JOptionPane.INFORMATION_MESSAGE);
       }
     }
   }
   private static JComponent createHorizontalSeperator(){
 
     JSeparator sep = new JSeparator(SwingConstants.HORIZONTAL);
     sep.setPreferredSize(new Dimension(50, 3));
 
     return sep;
   }
   public String getTitle() {
     return title;
   }
   public void setTitle(String title) {
     this.title = title;
   }
}
```
RenderWindow

```
package Window;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseListener;
import java.net.URL;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JSeparator;
import javax.swing.JSlider;
import javax.swing.JToolBar;
import javax.swing.event.AncestorEvent;
import javax.swing.event.AncestorListener;

import Panels.Panel1;
import Panels.Panel2;
import Panels.RenderOverlay;
import Panels.WindowMain;
import Tools.Positiontools;
import Variables.Variables;


public class RenderWindow implements ActionListener{
  
   static JButton grid, grap, shadows, playArea, XYachse;
   public static JButton layer1;
   public static JButton layer2;
   static JButton additionalInfo;
   static JButton collision;
   public static JInternalFrame mboxFrame;
   public static int spdY, li1 = 0, li2 = 0;
   public static int spdX;
   public static int zuwachsX;
   public static int zuwachsY;
   public static JSlider slider1;
   static int i = 0, grid2 = 0, playArea2, XYachse2, adInfo = 0, grap1 = 0, col2 = 0;
   private static boolean grid1 = false;
   private static boolean playArea1 = false;
   private static boolean XYachse1 = false;

   public RenderWindow(){

   }
  
   public static JInternalFrame RenderWindow1(){
    
     grid = new JButton();
     slider1 = new JSlider(JSlider.HORIZONTAL, 0, 100, 50);
    
     Dimension d = slider1.getPreferredSize();
    
     URL buildMneu = WindowMain.class.getResource("Build_menu.png");
    
     JSeparator seperator= new JSeparator();
     seperator.setOrientation(JSeparator.HORIZONTAL);
    
     Positiontools tools = new Positiontools();
     JToolBar toolBar = new JToolBar("toolbar", JToolBar.HORIZONTAL);
    
     mboxFrame = new JInternalFrame("Mail Reader", true, true, true, false);
    
     for(MouseListener listener : ((javax.swing.plaf.basic.BasicInternalFrameUI) mboxFrame.getUI()).getNorthPane().getMouseListeners()){
       ((javax.swing.plaf.basic.BasicInternalFrameUI) mboxFrame.getUI()).getNorthPane().removeMouseListener(listener);
       }
    
       mboxFrame.setTitle("Render Window");
      mboxFrame.setLayout(new BorderLayout());
      mboxFrame.setResizable(false);
      mboxFrame.setBounds(100, 0, tools.getScreenSizeX() -490, tools.getScreenSizeY() -300);
      mboxFrame.setFocusable(true);
      mboxFrame.setFocusTraversalKeysEnabled(true);
      
      mboxFrame.addKeyListener(new KeyListener() {
        public void keyPressed(KeyEvent e) {
          
           int key = e.getKeyCode();
          
           if(key == KeyEvent.VK_W){
             spdY = 1;
             zuwachsY = 1;
             RenderOverlay.setKey("W");
           }
           if(key == KeyEvent.VK_S){
             spdY = -1;
             zuwachsY = -1;
             RenderOverlay.setKey("S");
           }
           if(key == KeyEvent.VK_A){
             spdX = 1;
             zuwachsX = 1;
             RenderOverlay.setKey("A");
           }
           if(key == KeyEvent.VK_D){
             spdX = -1;
             zuwachsX = -1;
             RenderOverlay.setKey("D");
           }
           if(key == KeyEvent.VK_Q)RenderOverlay.setKey("Q");
           if(key == KeyEvent.VK_Y)RenderOverlay.setKey("Y");
           if(key == KeyEvent.VK_X)RenderOverlay.setKey("X");
           if(key == KeyEvent.VK_C)RenderOverlay.setKey("C");
           if(key == KeyEvent.VK_V)RenderOverlay.setKey("V");
           if(key == KeyEvent.VK_F)RenderOverlay.setKey("F");
           if(key == KeyEvent.VK_E)RenderOverlay.setKey("E");
           if(key == KeyEvent.VK_R)RenderOverlay.setKey("R");
           if(key == KeyEvent.VK_T)RenderOverlay.setKey("T");
           if(key == KeyEvent.VK_G)RenderOverlay.setKey("G");
           if(key == KeyEvent.VK_V)RenderOverlay.setKey("V");
           if(key == KeyEvent.VK_B)RenderOverlay.setKey("B");
           if(key == KeyEvent.VK_H)RenderOverlay.setKey("H");
           if(key == KeyEvent.VK_Z)RenderOverlay.setKey("Z");
           if(key == KeyEvent.VK_U)RenderOverlay.setKey("U");
           if(key == KeyEvent.VK_J)RenderOverlay.setKey("J");
           if(key == KeyEvent.VK_N)RenderOverlay.setKey("N");
           if(key == KeyEvent.VK_M)RenderOverlay.setKey("M");
           if(key == KeyEvent.VK_K)RenderOverlay.setKey("K");
           if(key == KeyEvent.VK_I)RenderOverlay.setKey("I");
           if(key == KeyEvent.VK_O)RenderOverlay.setKey("O");
           if(key == KeyEvent.VK_P)RenderOverlay.setKey("P");
           if(key == KeyEvent.VK_L)RenderOverlay.setKey("L");
          
        }
        public void keyReleased(KeyEvent e) {
          
           int key = e.getKeyCode();
          
           if(key == KeyEvent.VK_W){
             spdY = 0;
             zuwachsY = 0;
             RenderOverlay.setKey("");
           }
           if(key == KeyEvent.VK_S){
             spdY = 0;
             zuwachsY = 0;
             RenderOverlay.setKey("");
           }
           if(key == KeyEvent.VK_A){
             spdX = 0;
             zuwachsX = 0;
             RenderOverlay.setKey("");
           }
           if(key == KeyEvent.VK_D){
             spdX = 0;
             zuwachsX = 0;
             RenderOverlay.setKey("");
           }
           if(key == KeyEvent.VK_Q)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_Y)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_X)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_C)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_V)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_F)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_E)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_R)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_T)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_G)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_V)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_B)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_H)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_Z)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_U)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_J)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_N)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_M)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_K)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_I)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_O)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_P)RenderOverlay.setKey("");
           if(key == KeyEvent.VK_L)RenderOverlay.setKey("");
        }
        public void keyTyped(KeyEvent e) {
          
        }
       });
    
      grap = new JButton();
      grap.setIcon(new ImageIcon("Textures\\Grap.png"));
      grap.setFocusable(false);
      grap.setFocusTraversalKeysEnabled(false);
      grap.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(grap1 == 0){
            
              grap.setIcon(new ImageIcon("Textures\\Grap_activ.png"));
           }else{
            
             grap1 = -1;
              grap.setIcon(new ImageIcon("Textures\\Grap.png"));
           }
           grap1++;
          
           ConsoleWindow.setConsoleInput("activate additional Information");
           ConsoleWindow.setConsoleInput("grap tool");
         }
       });
      
      additionalInfo = new JButton();
      additionalInfo.setIcon(new ImageIcon("Textures\\adInfo.png"));
      additionalInfo.setFocusable(false);
      additionalInfo.setFocusTraversalKeysEnabled(false);
      additionalInfo.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(adInfo == 0){
             Panel1.additionalInfo = true;
             additionalInfo.setIcon(new ImageIcon("Textures\\adInfo_activated.png"));
           }else{
             Panel1.additionalInfo = false;
             adInfo = -1;
             additionalInfo.setIcon(new ImageIcon("Textures\\adInfo.png"));
           }
           adInfo++;
          
           ConsoleWindow.setConsoleInput("activate additional Information");
         }
       });
      
      grid = new JButton();
      grid.setIcon(new ImageIcon("Textures\\Grid_Layout.png"));
      grid.setFocusable(false);
      grid.setFocusTraversalKeysEnabled(false);
      grid.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(grid2 == 0){
             grid1 = true;
             grid.setIcon(new ImageIcon("Textures\\Grid_Layout_activ.png"));
           }else{
             grid1 = false;
             grid2 = -1;
             grid.setIcon(new ImageIcon("Textures\\Grid_Layout.png"));
           }
           grid2++;
          
           ConsoleWindow.setConsoleInput("showing grid");
         }
       });
      
      playArea = new JButton();
      playArea.setIcon(new ImageIcon("Textures\\play_Area.png"));
      playArea.setFocusable(false);
      playArea.setFocusTraversalKeysEnabled(false);
      playArea.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(playArea2 == 0){
             playArea1 = true;
             playArea.setIcon(new ImageIcon("Textures\\play_Area_activ.png"));
           }else{
             playArea1 = false;
             playArea2 = -1;
             playArea.setIcon(new ImageIcon("Textures\\play_Area.png"));
           }
           playArea2++;
          
           ConsoleWindow.setConsoleInput("show playable area");
         }
       });
      XYachse = new JButton();
      XYachse.setIcon(new ImageIcon("Textures\\XYAchse1.png"));
      XYachse.setFocusable(false);
      XYachse.setFocusTraversalKeysEnabled(false);
      XYachse.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(  XYachse2 == 0){
              XYachse1 = true;
              XYachse.setIcon(new ImageIcon("Textures\\XYAchse1_activ.png"));
           }else{
              XYachse1 = false;
              XYachse2 = -1;
              XYachse.setIcon(new ImageIcon("Textures\\XYAchse1.png"));
           }
            XYachse2++;
          
            ConsoleWindow.setConsoleInput("show XY Coordinates");
         }
       });
      shadows = new JButton();
      shadows.setIcon(new ImageIcon("Textures\\Shadow_Gen.png"));
      shadows.setFocusable(false);
      shadows.setFocusTraversalKeysEnabled(false);
      shadows.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
          
           ConsoleWindow.setConsoleInput("activate shadows");
         }
       });
      
      layer1 = new JButton("Layer1");
      layer1.setFocusable(false);
      layer1.setBackground(Color.RED);
      layer1.setFocusTraversalKeysEnabled(false);
      layer1.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(li1 == 0){
             Variables.setLayer1(false);
             layer1.setBackground(Color.RED);
             li1++;
             ConsoleWindow.setConsoleInput("deactivate layer1");
           }else{
             Variables.setLayer1(true);
             layer1.setBackground(Color.GREEN);
             li1 = 0;
             ConsoleWindow.setConsoleInput("activate layer2");
           }
         }
       });
      
      layer2 = new JButton("layer2");
      layer2.setFocusable(false);
      layer2.setBackground(Color.RED);
      layer2.setFocusTraversalKeysEnabled(false);
      layer2.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {
          
           if(li2 == 0){
             Variables.setLayer2(false);
             layer2.setBackground(Color.RED);
             li2++;
             ConsoleWindow.setConsoleInput("deactivate layer2");
           }else{
             Variables.setLayer2(true);
             layer2.setBackground(Color.GREEN);
             li2 = 0;
             ConsoleWindow.setConsoleInput("activate layer2");
           }
         }
       });
      
      collision = new JButton(new ImageIcon("Textures\\collision.png"));
      collision.setFocusable(false);
      collision.setFocusTraversalKeysEnabled(false);
      collision.addActionListener(new ActionListener(){

         @Override
         public void actionPerformed(ActionEvent e) {

           if(  col2 == 0){
            
             collision.setIcon(new ImageIcon("Textures\\collision_activ.png"));
             Panel1.showCollsion = true;
             Panel2.showCollsion = true;

           }else{
             collision.setIcon(new ImageIcon("Textures\\collision.png"));
             Panel1.showCollsion = false;
             Panel2.showCollsion = false;
             col2 = -1;
            
           }
           col2++;
         }
       });
      
      slider1.setPreferredSize(new Dimension(d.width-1000,d.height));
      slider1.setPaintTicks(true);
      slider1.setPaintLabels(false);
      slider1.setValue(0);
      slider1.setToolTipText("Zoom" + 0);
      slider1.setMaximum(100);
      slider1.setMinimum(8);
      slider1.setMinorTickSpacing(2);
      
       toolBar.add(grid);
       toolBar.add(seperator);
       toolBar.add(seperator);
       toolBar.add(grap);
       toolBar.add(playArea);
       toolBar.add(XYachse);
       toolBar.add(layer1);
       toolBar.add(layer2);
       toolBar.add(slider1);
       toolBar.add(additionalInfo);
       toolBar.add(seperator);
       toolBar.add(collision);
       toolBar.add(shadows);
      
       toolBar.setFocusable(false);
       toolBar.setFocusTraversalKeysEnabled(false);
      
       mboxFrame.add(toolBar, BorderLayout.NORTH);
      
      mboxFrame.setVisible(true);
      
      return mboxFrame; 
   }

   public static JInternalFrame getMboxFrame() {
     return mboxFrame;
   }

   public static void setMboxFrame(JInternalFrame mboxFrame) {
     RenderWindow.mboxFrame = mboxFrame;
   }

   public static boolean isXYachse1() {
     return XYachse1;
   }

   public static void setXYachse1(boolean xYachse1) {
     XYachse1 = xYachse1;
   }

   public static boolean isPlayArea1() {
     return playArea1;
   }

   public static void setPlayArea1(boolean playArea1) {
     RenderWindow.playArea1 = playArea1;
   }

   public static int getZuwachsX() {
     return zuwachsX;
   }

   public static void setZuwachsX(int zuwachsX) {
     RenderWindow.zuwachsX = zuwachsX;
   }

   public static int getZuwachsY() {
     return zuwachsY;
   }

   public static void setZuwachsY(int zuwachsY) {
     RenderWindow.zuwachsY = zuwachsY;
   }

   @Override
   public void actionPerformed(ActionEvent e) {
     // TODO Auto-generated method stub
    
   }
  
   public static int getSpdY() {
     return spdY;
   }

   public static void setSpdY(int spdY) {
     WindowMain.spdY = spdY;
   }

   public static int getSpdX() {
     return spdX;
   }

   public static void setSpdX(int spdX) {
     WindowMain.spdX = spdX;
   }

   public static boolean isGridActivate() {
     return grid1;
   }

   public static void setGridActivate(boolean gridÀctivate) {
     RenderWindow.grid1 = gridÀctivate;
   }
}
```


----------



## Joose (2. Dez 2016)

Bitte Code in Code-Tags posten, danke! 
[code=java] ... dein code ... [/code]


----------



## Thallius (2. Dez 2016)

Das kann nicht klappen. Aber das wurde hier auch schon zigmal durchgekaut und bedarf nicht einmal 3min suchen hier im Forum.


----------

