package gui;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
public class SwingFenster extends JFrame
{
// Instanz- oder Membervariablen
String[] karte =
{
"A", "B","C",
"D","E","F",
"G","H","I",
"J", "K", "L",
"M","N","O",
"PQ","R","ST","UVW","XYZ"
};
JPanel listPanel = new JPanel();
/**
* JList
*/
JList[] jliste = new JList[karte.length];
JListData dataModel = null;
public SwingFenster()
{ // Konstruktor mit Parameter
// Aufruf des Konstruktors der Oberklasse
super("Swing Fenster");
this.setJMenuBar(new Menu(this)); //legt die Bar auf das Panel
Container cpane = this.getContentPane();
GridBagLayout grid = new GridBagLayout();
GridBagConstraints constraints = new GridBagConstraints();
cpane.setLayout(grid);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTabbedPane tabbedPane = new JTabbedPane();
for(int i=0; i < karte.length; i++)
{
JPanel panel = makeTextPanel();
tabbedPane.addTab(karte[i],panel);
}
cpane.add(tabbedPane); // tabbedPane auf Panel legen
// alles schön packen
this.pack();
}// end of constructor