Browse Source

create title front panel

master
Yazan Alaamer 2 years ago
parent
commit
8c53b279f8
  1. 15
      src/main/java/game/StartDarkSoulsGame.java

15
src/main/java/game/StartDarkSoulsGame.java

@ -5,17 +5,17 @@ import java.awt.Font;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import Gui.gui; import Gui.gui;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JLabel; import javax.swing.JLabel;
public class StartDarkSoulsGame {
public class StartDarkSoulsGame {
JPanel titleNamePanel;
JLabel titelNameLabel;
Font titelFont = new Font("Times new Roma", Font.PLAIN, 90);
Container con; Container con;
public StartDarkSoulsGame() { public StartDarkSoulsGame() {
gui.Frame.setSize(800, 600); gui.Frame.setSize(800, 600);
@ -24,5 +24,12 @@ public class StartDarkSoulsGame {
gui.Frame.setLayout(null); gui.Frame.setLayout(null);
gui.Frame.setVisible(true); gui.Frame.setVisible(true);
con = gui.Frame.getContentPane(); con = gui.Frame.getContentPane();
titleNamePanel = new JPanel(); // commit 2
titleNamePanel.setBounds(100,100,600, 150); // commit 2
titleNamePanel.setBackground(Color.black); // commit 2
titelNameLabel = new JLabel("Dark souls 4 "); // commit 2
titelNameLabel.setForeground(Color.white); // comiit 2
titelNameLabel.setFont(titelFont); // commit 2
} }
} }
Loading…
Cancel
Save