public class MainFrame extends JFrame {
...
JFrame Main = new JFrame();
Vector<Component> order = new Vector<Component>();
JLabel lb_artOfPatrol = new JLabel("Streifenart *)");
JComboBox cb_artOfPatrol = new JComboBox( );
JLabel lb_operationOffice = new JLabel ("Einsatzdienststelle *)");
JComboBox cb_operationOffice = new JComboBox();
JLabel lb_Zivil = new JLabel ("Zivilfahrzeuge:");
JLabel lb_zivilTyp = new JLabel ("Fz.typ (zivil)");
JTextField tf_zivilTyp = new JTextField();
JLabel lb_patrolArea = new JLabel ("Streifenbereich *)");
JComboBox cb_patrolArea = new JComboBox();
JLabel lb_licenceNumber = new JLabel ("amtl. Kennzeichen. *)");
JTextField tf_licenceNumber = new JTextField();
JLabel lb_zivilColor = new JLabel ("Fz.farbe (zivil)");
JTextField tf_zivilColor = new JTextField();
JLabel lb_patrolIdentification = new JLabel ("Streifenbezeichnung *)");
JComboBox cb_patrolIdentification = new JComboBox();
JLabel lb_date = new JLabel ("Einsatzdatum *)");
JTextField tf_date = new JTextField();
JCheckBox ch_nightService = new JCheckBox("Nacht");
JButton bt_calender = new JButton("Kalender");
...
public MainFrame(SystemData sys, ErrorHelper error, PropertyData data, ReportData report, ArrayList<ReportData> lists,
CollectionController controller, CheckFiles files)
{
..
// Festlegen der Reihenfolge, in der die Komponenten angesprungen werden
order.add(cb_artOfPatrol);
order.add(cb_operationOffice);
order.add(cb_patrolArea);
order.add(cb_patrolIdentification);
order.add(tf_licenceNumber);
order.add(ch_nightService);
order.add(bt_calender);
public Container addComponentsToPane(){
..
Container pane = getContentPane();
{
/* Das Hauptfenster wird mit einem Panel belegt, welches
* wiederum in mehrere einzelne Panels unterteilt ist.
* Auch diese Panels sind ihrerseits mit weiteren Panels
* verschachtelt.
*
* 1. Einteilung
* Das Hauptfenster (tp_main) wird in zwei Bereiche eingeteilt:
* 1. Bereich : TabbedPane (pan_tabbed1)
* 2. Bereich : (pan_2) Liste für schriftliche Arbeiten, Liste für Einsätze, weitere Navigation (z.B. Buttons)
*
*/
..
/* zur pan_tabbed1 :
*
* 1. Unterteilung : Die erste Ansicht der TabbedPane (pan_tabbed11) enthält z.B. Streifenart, Einsatzdienststelle, Streifenbereich
* 2. Unterteilung : Die 2.Ansicht (pan_tabbed12) enthält das Einsatzdatum, Nachtdienst, amtl. Kennzeichen
*
*/
pan_tabbed1.setLayout(new GridLayout (1,3));
pan_tabbed1.setBorder(new EmptyBorder(35,25,0,80));
pan_tabbed1.setBackground(_Sys.getBackground());
// 1. Unterpanel
JPanel pan_tabbed11 = new JPanel();
pan_tabbed11.setLayout(new GridLayout(4,2));
pan_tabbed11.setBorder(new EmptyBorder(20,25,230,190));
pan_tabbed11.add(lb_artOfPatrol);
cb_artOfPatrol.addFocusListener(new FocusListener(){
public void focusGained(FocusEvent e) {
// TODO Auto-generated method stub
}
public void focusLost(FocusEvent e) {
i = 100;
}
});
pan_tabbed11.add(cb_artOfPatrol);
pan_tabbed11.add(lb_operationOffice);
pan_tabbed11.add(cb_operationOffice);
cb_operationOffice.setEditable(true);
pan_tabbed11.add(lb_patrolArea);
cb_patrolArea.setEditable(true);
pan_tabbed11.add(cb_patrolArea);
pan_tabbed1.add(pan_tabbed11);
// 2.Unterpanel
JPanel pan_tabbed12 = new JPanel();
pan_tabbed12.setLayout(new GridLayout(4,2));
pan_tabbed12.setBorder(new EmptyBorder(20,25,230,190));
pan_tabbed12.add(lb_patrolIdentification);
cb_patrolIdentification.setEditable(true);
pan_tabbed12.add(cb_patrolIdentification);
pan_tabbed12.add(lb_licenceNumber);
pan_tabbed12.add(tf_licenceNumber);