Highscore Design angepasst
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package de.oszimt.ls.aliendefence.view.menue;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Vector;
|
||||
@@ -15,6 +14,7 @@ import javax.swing.JTable;
|
||||
import de.oszimt.ls.aliendefence.controller.AttemptController;
|
||||
import de.oszimt.ls.aliendefence.model.Level;
|
||||
|
||||
|
||||
public class Highscore extends JFrame {
|
||||
|
||||
// Attribute
|
||||
@@ -50,13 +50,25 @@ public class Highscore extends JFrame {
|
||||
|
||||
// Tablle basierend auf zweidimensionalem Vector
|
||||
JTable table = new JTable(vecRow, title);
|
||||
table.setBackground(Color.BLACK);
|
||||
table.setForeground(Color.YELLOW);
|
||||
table.setSelectionBackground(Color.YELLOW);
|
||||
table.setSelectionForeground(Color.BLACK);
|
||||
table.getTableHeader().setOpaque(false);
|
||||
table.getTableHeader().setBackground(Color.BLACK);
|
||||
table.getTableHeader().setForeground(Color.YELLOW);
|
||||
|
||||
if (mark >= 0)
|
||||
table.setRowSelectionInterval(mark, mark);
|
||||
setMinimumSize(new Dimension(650, 500));
|
||||
getContentPane().add(new JScrollPane(table), BorderLayout.NORTH);
|
||||
JScrollPane scrollPane = new JScrollPane(table);
|
||||
scrollPane.getViewport().setBackground(Color.BLACK);
|
||||
getContentPane().add(scrollPane, BorderLayout.NORTH);
|
||||
setTitle("Highscore-Liste"); // Titel
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
pack();
|
||||
getContentPane().setBackground(Color.BLACK);
|
||||
|
||||
setVisible(true);
|
||||
|
||||
JButton btnZielndern = new JButton("Highscoreliste löschen");
|
||||
@@ -67,6 +79,7 @@ public class Highscore extends JFrame {
|
||||
});
|
||||
|
||||
JPanel pnlSouth = new JPanel();
|
||||
pnlSouth.setBackground(Color.BLACK);
|
||||
pnlSouth.add(btnZielndern);
|
||||
|
||||
// fügt Panel mit Button hinzu
|
||||
|
||||
Reference in New Issue
Block a user