package GUI;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class AddFrame extends JFrame{
public JScrollPane scrollPane;
public JPanel titelContainer;
public JPanel beschreibungContainer;
public JPanel tagContainer;
public JPanel addBildButtonContainer;
public JPanel scrollPanePanel;
public JPanel tagPanel;
public JLabel beschreibungLabel;
public JLabel titelLabel;
public JTextField titel;
public JTextArea beschreibung;
public JComboBox<String> tag1;
public JComboBox<String> tag2;
public JComboBox<String> tag3;
public JButton addBild;
public JButton addTag;
public int anzahlTags = 3;
public AddFrame(){
this.setTitle("DVD Hinzufügen");
this.setSize(400,200);
titelContainer = new JPanel();
titelContainer.setLayout(new GridLayout(2, 1));
beschreibungContainer = new JPanel();
tagContainer = new JPanel();
addBildButtonContainer = new JPanel();
scrollPanePanel = new JPanel();
scrollPanePanel.setLayout(new GridLayout(5,1));
titelLabel = new JLabel("Titel:");
titel = new JTextField(15);
titelContainer.add(titelLabel);
titelContainer.add(titel);
beschreibung = new JTextArea();
beschreibung.setColumns(20);
beschreibung.setRows(10);
beschreibungContainer.add(beschreibung);
tagPanel = new JPanel();
tagPanel.setLayout(new GridLayout(anzahlTags + 1, 1,5,5));
String[] categories = new String[] {"Katigorie Auswählen", "Action", "Abenteuer", "Kinder", "Famielie", "Komödie", "Zeichentrik", "Horror", "Krimi", "Fantasy", "Sience Fiction", "Thriller", "Romantik", "Historien Film", "Dokumentation", "Anime", "Realety TV", "Western"};
tag1 = new JComboBox<>(categories);
tag2 = new JComboBox<>(categories);
tag3 = new JComboBox<>(categories);
addTag = new JButton("Neuer Tag Hinzufügen");
tagPanel.add(tag1);
tagPanel.add(tag2);
tagPanel.add(tag3);
tagPanel.add(addTag);
tagContainer.add(tagPanel);
addBild = new JButton("Bild Hinzufügen");
addBildButtonContainer.add(addBild);
scrollPanePanel.add(titelContainer);
scrollPanePanel.add(beschreibungContainer);
scrollPanePanel.add(tagContainer);
scrollPanePanel.add(addBildButtonContainer);
scrollPane = new JScrollPane(scrollPanePanel);
getContentPane().add(scrollPane, BorderLayout.CENTER);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
}
public void showAddFrame(){
this.setVisible(true);
}
}