/*
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import javax.swing.*;
public class DataSheetPanelMain extends JPanel implements ActionListener {
private DataSheetPanelMainAuswahl auswahlPanel;
private DataSheetPanelMainEinzelne einzelnePanel;
private DataSheetController controller;
private final String UPDATE_PANEL = "updatePanel";
private final String AUSWAHL_PANEL = "auswahlPanel";
private final String EINZELNE_PANEL = "einzelnePanel";
private JButton btnBack, btnGo;
private JPanel cardPanel;
private int intPosition = 0;
private GridBagLayout gbl;
public DataSheetPanelMain() {
initialisize();
cardPanel = new JPanel();
cardPanel.setLayout(new CardLayout());
JPanel updatePanel = new JPanel();
auswahlPanel = new JPanel();
einzelnePanel = new JPanel();
cardPanel.add(updatePanel, UPDATE_PANEL);
cardPanel.add(auswahlPanel, AUSWAHL_PANEL);
cardPanel.add(einzelnePanel, EINZELNE_PANEL);
//Buttons initialisieren
btnBack = new JButton("zurück");
btnGo = new JButton("weiter");
//Listeners, Commands
btnBack.setActionCommand("Back");
btnGo.setActionCommand("Go");
btnBack.addActionListener(this);
btnGo.addActionListener(this);
//Grössen
btnBack.setPreferredSize(new Dimension(80, 23));
btnGo.setPreferredSize(new Dimension(80, 23));
addComponent(cardPanel, 0, 0, 3, 1, 1.0, 1.0);
addComponent(Box.createRigidArea(new Dimension(0, 0)), 0, 1, 1, 1, 1.0,
0.0);
addComponent(btnBack, 1, 1, 1, 1, 0.0, 0.0);
addComponent(btnGo, 2, 1, 1, 1, 0.0, 0.0);
}
private void initialisize() {
gbl = new GridBagLayout();
this.setLayout(gbl);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
}
private void addComponent(Component comp, int x, int y, int width,
int height, double weightx, double weighty) {
GridBagConstraints constraints = new GridBagConstraints();
//wie wird die zelle ausgefüllt;
constraints.fill = GridBagConstraints.BOTH;
//Position im Gitter
constraints.gridx = x;
constraints.gridy = y;
//Platz der beansprucht wird (standard 1, 1)
constraints.gridwidth = width;
constraints.gridheight = height;
//sollen die Zellen ausgedehnt werden
constraints.weightx = weightx;
constraints.weighty = weighty;
gbl.setConstraints(comp, constraints);
this.add(comp);
}
public void actionPerformed(ActionEvent e) {
JButton btn = (JButton) e.getSource();
if(e.getActionCommand().equals("Back")) {
CardLayout cl = (CardLayout) cardPanel.getLayout();
cl.previous(cardPanel);
intPosition--;
}
else if(e.getActionCommand().equals("Go")) {
}
}
}