content: /*
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  package havayolubilgisistemi;
  
  import java.awt.BorderLayout;
  import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.Font;
  import java.awt.GridLayout;
  import java.awt.Insets;
  import java.awt.Panel;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  import javax.swing.BorderFactory;
  import javax.swing.ButtonGroup;
  import javax.swing.ButtonModel;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.UIManager;
  import javax.swing.UnsupportedLookAndFeelException;
  
  /**
   *
   * @author AsusTuf
   */
  public class KoltukSec extends javax.swing.JFrame {
  
          private JPanel seatPanel;
          private ButtonGroup buttonGroup;
          private Ucus ucus = null;
          private Yolcu yol = null;
  
          public KoltukSec(Ucus ucus, Yolcu yolcu) {
                  initComponents();
                  try {
                          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                  } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException
                                  | IllegalAccessException e) {
                          e.printStackTrace();
                  }
                  this.ucus = ucus;
                  this.yol = yolcu;
                  Color backgroundColor = new Color(197, 255, 248);
                  getContentPane().setBackground(backgroundColor);
                  Olustur();
                  jLabel1.setBackground(new Color(248, 189, 235));
                  SecButton1.setEnabled(false);
          }
  
          private void Olustur() {
  
                  seatPanel = new JPanel(new GridLayout(ucus.ucak.harfSayisi, ucus.ucak.siraSayisi, 5, 5));
                  seatPanel.setBorder(
                                  BorderFactory.createEmptyBorder(ucus.ucak.harfSayisi, ucus.ucak.siraSayisi, 10, 10));
                  buttonGroup = new ButtonGroup();
  
                  for (int c = ucus.ucak.harfSayisi - 1; c >= 0; c--) {
                          for (int i = 1; i < ucus.ucak.siraSayisi; i++) {
  
                                  String seatNumber = ucus.ucak.kolutkList[i][c].No;
                                  JButton seatButton = new JButton(seatNumber);
                                  seatButton.setPreferredSize(new Dimension(100, 100));
                                  seatButton.setMargin(new Insets(0, 0, 0, 0));
  
                                  if (ucus.ucak.kolutkList[i][c].koltuktipi.equals(Koltuk.tipi[0])) {
                                          seatButton.setBackground(new Color(251, 236, 178));
                                  } else if (ucus.ucak.kolutkList[i][c].koltuktipi.equals(Koltuk.tipi[1])) {
                                          seatButton.setBackground(new Color(82, 114, 242));
                                  } else if (ucus.ucak.kolutkList[i][c].koltuktipi.equals(Koltuk.tipi[2])) {
                                          seatButton.setBackground(new Color(248, 189, 235));
                                  } else {
                                          System.out.println("No");
                                  }
                                  if (ucus.ucak.kolutkList[i][c].durum) {
                                          seatButton.setBackground(new Color(57, 36, 103));
                                          seatButton.setEnabled(false);
                                  }
                                  if (i == (ucus.ucak.siraSayisi / 3) + 1) {
                                          seatPanel.add(new Panel());
                                  } else if (i == (ucus.ucak.siraSayisi * 2 / 3) + 1) {
                                          seatPanel.add(new Panel());
                                  }
  
                                  seatButton.setActionCommand(seatNumber);
                                  seatButton.addActionListener(new ActionListener() {
                                          @Override
                                          public void actionPerformed(ActionEvent e) {
                                                  handleSeatSelection(e.getActionCommand());
                                                  dolu(e.getActionCommand());
                                                  SecButton1.setEnabled(true);
                                          }
                                  });
                                  buttonGroup.add(seatButton);
                                  seatPanel.add(seatButton);
                          }
                  }
                  jPanel3.add(seatPanel);
                  setTitle("Seat Selection Example");
                  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  setLocationRelativeTo(null);
          }
  
          private void dolu(String koltuk) {
                  int row = 0, kol = 0, cul = 0;
                  if (koltuk.length() == 2) {
                          row = Character.getNumericValue(koltuk.charAt(0));
                          kol = koltuk.charAt(1) - 65;
                  } else if (koltuk.length() == 3) {
                          row = Character.getNumericValue(koltuk.charAt(0)) * 10;
                          cul = Character.getNumericValue(koltuk.charAt(1));
                          kol = koltuk.charAt(2) - 65;
                  }
                  ucus.ucak.kolutkList[row + cul][kol].durum = true;
                  double ucret = ucus.ucak.kolutkList[row + cul][kol].ucret;
                  if (yol.Ytip == Yolcu.tip[1]) {
                          ucret -= ucret * 1 / 5;
                  }
                  UcretTextField.setText(Double.toString(ucret));
          }
  
          public KoltukSec() {
                  initComponents();
                  try {
                          UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                  } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException
                                  | IllegalAccessException e) {
                          e.printStackTrace();
                  }
                  Olustur();
          }
  
          private void handleSeatSelection(String selectedSeat) {
                  System.out.println("Selected Seat: " + selectedSeat);
                  yol.Koltuk = selectedSeat;
                  System.out.println(yol.Koltuk);
  
          }
  
          /**
           * This method is called from within the constructor to initialize the form.
           * WARNING: Do NOT modify this code. The content of this method is always
           * regenerated by the Form Editor.
           */
          @SuppressWarnings("unchecked")
          // <editor-fold defaultstate="collapsed" desc="Generated
          // Code">//GEN-BEGIN:initComponents
          private void initComponents() {
  
                  jPanel1 = new javax.swing.JPanel();
                  jPanel2 = new javax.swing.JPanel();
                  GeriButton2 = new javax.swing.JButton();
                  jPanel8 = new javax.swing.JPanel();
                  jLabel3 = new javax.swing.JLabel();
                  jLabel5 = new javax.swing.JLabel();
                  jPanel9 = new javax.swing.JPanel();
                  jLabel6 = new javax.swing.JLabel();
                  jLabel7 = new javax.swing.JLabel();
                  jLabel12 = new javax.swing.JLabel();
                  label2 = new java.awt.Label();
                  UcretTextField = new javax.swing.JTextField();
                  jPanel3 = new javax.swing.JPanel();
                  jPanel4 = new javax.swing.JPanel();
                  SecButton1 = new javax.swing.JButton();
                  jPanel5 = new javax.swing.JPanel();
                  jLabel2 = new javax.swing.JLabel();
                  jPanel6 = new javax.swing.JPanel();
                  jLabel4 = new javax.swing.JLabel();
                  jPanel7 = new javax.swing.JPanel();
                  jLabel1 = new javax.swing.JLabel();
                  jPanel10 = new javax.swing.JPanel();
                  jLabel8 = new javax.swing.JLabel();
                  jLabel9 = new javax.swing.JLabel();
                  jPanel11 = new javax.swing.JPanel();
                  jLabel10 = new javax.swing.JLabel();
                  jLabel11 = new javax.swing.JLabel();
                  jLabel15 = new javax.swing.JLabel();
                  jPanel13 = new javax.swing.JPanel();
                  label1 = new java.awt.Label();
                  jPanel12 = new javax.swing.JPanel();
                  jLabel14 = new javax.swing.JLabel();
                  panel1 = new java.awt.Panel();
                  jLabel13 = new javax.swing.JLabel();
  
                  setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                  setResizable(false);
                  getContentPane().setLayout(new java.awt.GridLayout(1, 0));
  
                  jPanel1.setBackground(new java.awt.Color(255, 255, 255));
                  jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
  
                  jPanel2.setBackground(new java.awt.Color(255, 255, 255));
  
                  GeriButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
                  GeriButton2.setText("Geri");
                  GeriButton2.addActionListener(new java.awt.event.ActionListener() {
                          public void actionPerformed(java.awt.event.ActionEvent evt) {
                                  GeriButton2ActionPerformed(evt);
                          }
                  });
  
                  jPanel8.setBackground(new java.awt.Color(153, 0, 0));
  
                  jLabel3.setText("Exit");
  
                  jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
                  jLabel5.setText("/\\");
  
                  javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
                  jPanel8.setLayout(jPanel8Layout);
                  jPanel8Layout.setHorizontalGroup(
                                  jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel8Layout.createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel8Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addComponent(jLabel3,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  Short.MAX_VALUE)
                                                                                  .addGroup(jPanel8Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addComponent(jLabel5)
                                                                                                  .addGap(0, 0, Short.MAX_VALUE)))
                                                                  .addContainerGap()));
                  jPanel8Layout.setVerticalGroup(
                                  jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel8Layout.createSequentialGroup()
                                                                  .addComponent(jLabel5)
                                                                  .addPreferredGap(
                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel3)));
  
                  jPanel9.setBackground(new java.awt.Color(153, 0, 0));
  
                  jLabel6.setText("Exit");
  
                  jLabel7.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
                  jLabel7.setText("/\\");
  
                  javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
                  jPanel9.setLayout(jPanel9Layout);
                  jPanel9Layout.setHorizontalGroup(
                                  jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel9Layout.createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel9Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addComponent(jLabel6,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  Short.MAX_VALUE)
                                                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                                                                  jPanel9Layout.createSequentialGroup()
                                                                                                                  .addGap(0, 0, Short.MAX_VALUE)
                                                                                                                  .addComponent(jLabel7)))
                                                                  .addContainerGap()));
                  jPanel9Layout.setVerticalGroup(
                                  jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel9Layout.createSequentialGroup()
                                                                  .addComponent(jLabel7)
                                                                  .addPreferredGap(
                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel6)));
  
                  jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/havayolubilgisistemi/sağ.png"))); // NOI18N
                  jLabel12.setText(" ");
  
                  label2.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
                  label2.setText("Koltuk Ucreti");
  
                  javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                  jPanel2.setLayout(jPanel2Layout);
                  jPanel2Layout.setHorizontalGroup(
                                  jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel2Layout.createSequentialGroup()
                                                                  .addGroup(jPanel2Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                                                                  jPanel2Layout
                                                                                                                  .createSequentialGroup()
                                                                                                                  .addContainerGap(
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  Short.MAX_VALUE)
                                                                                                                  .addComponent(jPanel8,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                                  .addGap(27, 27, 27))
                                                                                  .addGroup(jPanel2Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addContainerGap()
                                                                                                  .addComponent(GeriButton2,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  114,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addGap(63, 292, Short.MAX_VALUE)))
                                                                  .addComponent(jLabel12,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  299,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                  .addGroup(jPanel2Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(jPanel2Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                                  .addComponent(jPanel9,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                                  .addGroup(jPanel2Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addGap(26, 26, 26)
                                                                                                  .addGroup(jPanel2Layout
                                                                                                                  .createParallelGroup(
                                                                                                                                  javax.swing.GroupLayout.Alignment.LEADING,
                                                                                                                                  false)
                                                                                                                  .addComponent(label2,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  Short.MAX_VALUE)
                                                                                                                  .addComponent(UcretTextField))))
                                                                  .addContainerGap(290, Short.MAX_VALUE)));
                  jPanel2Layout.setVerticalGroup(
                                  jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE, 220,
                                                                  Short.MAX_VALUE)
                                                  .addGroup(jPanel2Layout.createSequentialGroup()
                                                                  .addGroup(jPanel2Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.TRAILING)
                                                                                  .addGroup(jPanel2Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addContainerGap()
                                                                                                  .addComponent(GeriButton2,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  45,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addComponent(jPanel8,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                                  .addGroup(jPanel2Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addGap(19, 19, 19)
                                                                                                  .addComponent(label2,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  28,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                                  .addComponent(UcretTextField,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  32,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addComponent(jPanel9,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                                  .addContainerGap()));
  
                  jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 0, 1150, 220));
  
                  jPanel3.setBackground(new java.awt.Color(255, 255, 255));
                  jPanel3.setLayout(new java.awt.GridLayout(1, 0));
                  jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 220, 1020, 290));
  
                  jPanel4.setBackground(new java.awt.Color(255, 255, 255));
  
                  SecButton1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
                  SecButton1.setText("Seç");
                  SecButton1.addActionListener(new java.awt.event.ActionListener() {
                          public void actionPerformed(java.awt.event.ActionEvent evt) {
                                  SecButton1ActionPerformed(evt);
                          }
                  });
  
                  jPanel5.setBackground(new java.awt.Color(82, 114, 242));
  
                  jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
                  jLabel2.setText("Standart");
  
                  javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
                  jPanel5.setLayout(jPanel5Layout);
                  jPanel5Layout.setHorizontalGroup(
                                  jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout
                                                                  .createSequentialGroup()
                                                                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel2,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  70,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                  .addContainerGap()));
                  jPanel5Layout.setVerticalGroup(
                                  jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE, 21,
                                                                  Short.MAX_VALUE));
  
                  jPanel6.setBackground(new java.awt.Color(251, 236, 178));
  
                  jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
                  jLabel4.setText("Business");
  
                  javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
                  jPanel6.setLayout(jPanel6Layout);
                  jPanel6Layout.setHorizontalGroup(
                                  jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout
                                                                  .createSequentialGroup()
                                                                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel4)
                                                                  .addContainerGap()));
                  jPanel6Layout.setVerticalGroup(
                                  jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel6Layout.createSequentialGroup()
                                                                  .addComponent(jLabel4)
                                                                  .addGap(0, 0, Short.MAX_VALUE)));
  
                  jPanel7.setBackground(new java.awt.Color(248, 189, 235));
  
                  jLabel1.setBackground(new java.awt.Color(204, 0, 204));
                  jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
                  jLabel1.setText("Ekonomik");
  
                  javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
                  jPanel7.setLayout(jPanel7Layout);
                  jPanel7Layout.setHorizontalGroup(
                                  jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout
                                                                  .createSequentialGroup()
                                                                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel1)
                                                                  .addContainerGap()));
                  jPanel7Layout.setVerticalGroup(
                                  jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  Short.MAX_VALUE));
  
                  jPanel10.setBackground(new java.awt.Color(153, 0, 0));
  
                  jLabel8.setText("Exit");
  
                  jLabel9.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
                  jLabel9.setText("\\/");
  
                  javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
                  jPanel10.setLayout(jPanel10Layout);
                  jPanel10Layout.setHorizontalGroup(
                                  jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel10Layout.createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel10Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addComponent(jLabel8,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  Short.MAX_VALUE)
                                                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                                                                  jPanel10Layout.createSequentialGroup()
                                                                                                                  .addGap(0, 0, Short.MAX_VALUE)
                                                                                                                  .addComponent(jLabel9)))
                                                                  .addContainerGap()));
                  jPanel10Layout.setVerticalGroup(
                                  jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel10Layout.createSequentialGroup()
                                                                  .addComponent(jLabel8)
                                                                  .addPreferredGap(
                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel9)));
  
                  jPanel11.setBackground(new java.awt.Color(153, 0, 0));
  
                  jLabel10.setText("Exit");
  
                  jLabel11.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
                  jLabel11.setText("\\/");
  
                  javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
                  jPanel11.setLayout(jPanel11Layout);
                  jPanel11Layout.setHorizontalGroup(
                                  jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel11Layout.createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel11Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(jPanel11Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addComponent(jLabel10,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addContainerGap(
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE))
                                                                                  .addGroup(jPanel11Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addComponent(jLabel11)
                                                                                                  .addContainerGap(
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)))));
                  jPanel11Layout.setVerticalGroup(
                                  jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel11Layout.createSequentialGroup()
                                                                  .addComponent(jLabel10)
                                                                  .addPreferredGap(
                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)
                                                                  .addComponent(jLabel11)));
  
                  jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/havayolubilgisistemi/sol.png"))); // NOI18N
                  jLabel15.setText(" ");
  
                  jPanel13.setBackground(new java.awt.Color(0, 0, 0));
  
                  label1.setForeground(new java.awt.Color(255, 255, 255));
                  label1.setText("Dolu");
  
                  javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
                  jPanel13.setLayout(jPanel13Layout);
                  jPanel13Layout.setHorizontalGroup(
                                  jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel13Layout.createSequentialGroup()
                                                                  .addGap(30, 30, 30)
                                                                  .addComponent(label1,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  Short.MAX_VALUE)));
                  jPanel13Layout.setVerticalGroup(
                                  jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout
                                                                  .createSequentialGroup()
                                                                  .addGap(0, 0, Short.MAX_VALUE)
                                                                  .addComponent(label1,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)));
  
                  javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
                  jPanel4.setLayout(jPanel4Layout);
                  jPanel4Layout.setHorizontalGroup(
                                  jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(jPanel4Layout.createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel4Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                                                                                                  jPanel4Layout.createSequentialGroup()
                                                                                                                  .addComponent(jPanel11,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                                  .addGap(27, 27, 27))
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addGroup(jPanel4Layout
                                                                                                                  .createParallelGroup(
                                                                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                                                  .addComponent(jPanel5,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                                  .addComponent(jPanel6,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                                                  .addGap(18, 18, Short.MAX_VALUE)
                                                                                                  .addGroup(jPanel4Layout
                                                                                                                  .createParallelGroup(
                                                                                                                                  javax.swing.GroupLayout.Alignment.LEADING,
                                                                                                                                  false)
                                                                                                                  .addComponent(jPanel7,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  Short.MAX_VALUE)
                                                                                                                  .addComponent(jPanel13,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                                  Short.MAX_VALUE))
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                                                  196,
                                                                                                                  Short.MAX_VALUE)))
                                                                  .addComponent(jLabel15,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  295,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                  .addGroup(jPanel4Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                                                                                  127,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addComponent(SecButton1,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  131,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addGap(175, 175, 175))
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addPreferredGap(
                                                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                                                  .addComponent(jPanel10,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addContainerGap(
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)))));
                  jPanel4Layout.setVerticalGroup(
                                  jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  Short.MAX_VALUE)
                                                  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout
                                                                  .createSequentialGroup()
                                                                  .addContainerGap()
                                                                  .addGroup(jPanel4Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addComponent(jPanel11,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                  .addComponent(jPanel10,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE))
                                                                  .addPreferredGap(
                                                                                  javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                                  .addGroup(jPanel4Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.TRAILING)
                                                                                  .addComponent(SecButton1,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                  48,
                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createParallelGroup(
                                                                                                                  javax.swing.GroupLayout.Alignment.LEADING,
                                                                                                                  false)
                                                                                                  .addComponent(jPanel5,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addComponent(jPanel7,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)))
                                                                  .addGap(24, 24, 24)
                                                                  .addGroup(jPanel4Layout.createParallelGroup(
                                                                                  javax.swing.GroupLayout.Alignment.LEADING)
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addComponent(jPanel6,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)
                                                                                                  .addGap(60, 60, 60))
                                                                                  .addGroup(jPanel4Layout
                                                                                                  .createSequentialGroup()
                                                                                                  .addComponent(jPanel13,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                                                  .addContainerGap(
                                                                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                                                                  Short.MAX_VALUE)))));
  
                  jPanel1.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 510, 1140, 200));
  
                  jPanel12.setBackground(new java.awt.Color(102, 102, 255));
  
                  jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/havayolubilgisistemi/g (2).png"))); // NOI18N
                  jLabel14.setText(" ");
  
                  javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
                  jPanel12.setLayout(jPanel12Layout);
                  jPanel12Layout.setHorizontalGroup(
                                  jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
                  jPanel12Layout.setVerticalGroup(
                                  jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.TRAILING,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  Short.MAX_VALUE));
  
                  jPanel1.add(jPanel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(1160, 220, 120, 290));
  
                  jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/havayolubilgisistemi/c.png"))); // NOI18N
  
                  javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);
                  panel1.setLayout(panel1Layout);
                  panel1Layout.setHorizontalGroup(
                                  panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                  javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
                  panel1Layout.setVerticalGroup(
                                  panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                  .addGroup(panel1Layout.createSequentialGroup()
                                                                  .addGap(49, 49, 49)
                                                                  .addComponent(jLabel13,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                  354,
                                                                                  javax.swing.GroupLayout.PREFERRED_SIZE)
                                                                  .addContainerGap(67, Short.MAX_VALUE)));
  
                  jPanel1.add(panel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 130, 130, 470));
  
                  getContentPane().add(jPanel1);
  
                  pack();
          }// </editor-fold>//GEN-END:initComponents
  
          private void SecButton1ActionPerformed(java.awt.event.ActionEvent evt) {
                  // Seçti Koltuk ve Uçuşu Bileti Yazdır
                  Bilet bi = new Bilet(ucus, yol);
                  bi.setVisible(true);
                  setVisible(false);
          }
  
          private void GeriButton2ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_GeriButton2ActionPerformed
  
                  Ucuslar ucus1 = new Ucuslar(ucus, yol);
                  ucus1.setVisible(true);
                  setVisible(false);
          }// GEN-LAST:event_GeriButton2ActionPerformed
  
          /**
           * @param args the command line arguments
           */
          public static void main(String args[]) {
                  /* Set the Nimbus look and feel */
                  // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code
                  // (optional) ">
                  /*
                   * If Nimbus (introduced in Java SE 6) is not available, stay with the default
                   * look and feel.
                   * For details see
                   * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
                   */
                  try {
                          for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager
                                          .getInstalledLookAndFeels()) {
                                  if ("Nimbus".equals(info.getName())) {
                                          javax.swing.UIManager.setLookAndFeel(info.getClassName());
                                          break;
                                  }
                          }
                  } catch (ClassNotFoundException ex) {
                          java.util.logging.Logger.getLogger(KoltukSec.class.getName())
                                          .log(java.util.logging.Level.SEVERE, null, ex);
                  } catch (InstantiationException ex) {
                          java.util.logging.Logger.getLogger(KoltukSec.class.getName())
                                          .log(java.util.logging.Level.SEVERE, null, ex);
                  } catch (IllegalAccessException ex) {
                          java.util.logging.Logger.getLogger(KoltukSec.class.getName())
                                          .log(java.util.logging.Level.SEVERE, null, ex);
                  } catch (javax.swing.UnsupportedLookAndFeelException ex) {
                          java.util.logging.Logger.getLogger(KoltukSec.class.getName())
                                          .log(java.util.logging.Level.SEVERE, null, ex);
                  }
                  // </editor-fold>
  
                  /* Create and display the form */
                  java.awt.EventQueue.invokeLater(new Runnable() {
                          public void run() {
                                  new KoltukSec().setVisible(true);
                          }
                  });
          }
  
          // Variables declaration - do not modify//GEN-BEGIN:variables
          private javax.swing.JButton GeriButton2;
          private javax.swing.JButton SecButton1;
          private javax.swing.JTextField UcretTextField;
          private javax.swing.JLabel jLabel1;
          private javax.swing.JLabel jLabel10;
          private javax.swing.JLabel jLabel11;
          private javax.swing.JLabel jLabel12;
          private javax.swing.JLabel jLabel13;
          private javax.swing.JLabel jLabel14;
          private javax.swing.JLabel jLabel15;
          private javax.swing.JLabel jLabel2;
          private javax.swing.JLabel jLabel3;
          private javax.swing.JLabel jLabel4;
          private javax.swing.JLabel jLabel5;
          private javax.swing.JLabel jLabel6;
          private javax.swing.JLabel jLabel7;
          private javax.swing.JLabel jLabel8;
          private javax.swing.JLabel jLabel9;
          private javax.swing.JPanel jPanel1;
          private javax.swing.JPanel jPanel10;
          private javax.swing.JPanel jPanel11;
          private javax.swing.JPanel jPanel12;
          private javax.swing.JPanel jPanel13;
          private javax.swing.JPanel jPanel2;
          private javax.swing.JPanel jPanel3;
          private javax.swing.JPanel jPanel4;
          private javax.swing.JPanel jPanel5;
          private javax.swing.JPanel jPanel6;
          private javax.swing.JPanel jPanel7;
          private javax.swing.JPanel jPanel8;
          private javax.swing.JPanel jPanel9;
          private java.awt.Label label1;
          private java.awt.Label label2;
          private java.awt.Panel panel1;
          // End of variables declaration//GEN-END:variables
  }
  