Neues GUI und icons

This commit is contained in:
Noah
2021-09-28 15:26:57 +02:00
parent 0a1a0bf8fc
commit 16d469386c
8 changed files with 49 additions and 9 deletions
+41
View File
@@ -0,0 +1,41 @@
package gui;
import javax.swing.*;
public class GameGUI {
private JFrame jf;
public GameGUI(){
jf = new JFrame();
jf.setTitle("CT-Conway's Game of Life");
ImageIcon imageIcon = new ImageIcon("src/data/icon.png");
jf.setIconImage(imageIcon.getImage());
//getContentPane().setBackground(Color.decode("#121212"));
jf.setUndecorated(false);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.setAutoRequestFocus(false);
jf.setLayout(null);
jf.setSize(752, 424);
//jf.getContentPane().setPreferredSize(new Dimension(752, 423));
jf.setResizable(false);
//initComponents();
//addComponents();
jf.setLocationRelativeTo(null);
jf.setVisible(true);
}
}
+3 -3
View File
@@ -38,7 +38,7 @@ public class StartGUI{
jf.setTitle("CT-Conway's Game of Life");
ImageIcon imageIcon = new ImageIcon("src/data/icon.png");
ImageIcon imageIcon = new ImageIcon("src/data/cotroller.png");
jf.setIconImage(imageIcon.getImage());
//getContentPane().setBackground(Color.decode("#121212"));
@@ -68,7 +68,7 @@ public class StartGUI{
Font head = new Font("Segoe UI Light", Font.PLAIN, 24);
Font text = new Font("Segoe UI Light", Font.PLAIN, 16);
heading = new JLabel("Conway's Game of Life Control");
heading = new JLabel("Control Panel");
heading.setFont(head);
heading.setForeground(Color.decode("#121212"));
heading.setBounds(50, 25, 400, 50);
@@ -210,7 +210,7 @@ public class StartGUI{
manuelStart.setBounds(225, 280, 150, 50);
Icon gif = new ImageIcon("src/data/control.gif");
Icon gif = new ImageIcon("src/data/control2.png");
JLabel gifLabel = new JLabel(gif);
gifLabel.setBounds(391, 25, 336, 336);
jf.getContentPane().add(gifLabel);