Advertisement
Cihat47

Cihat47

Jun 8th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.91 KB | None | 0 0
  1. public class GUI_ATR extends JFrame implements ActionListener{
  2.    
  3.     // einzelne Buttons setzen
  4.    
  5.     // 'static' da in Inhalt_ATR auch benutzt wird
  6.     public static JButton kontaktlos_pruefen = new JButton();
  7.     public static JButton manuelle_eingabe = new JButton();
  8.    
  9.  
  10.  
  11. public void actionPerformed(ActionEvent e) {
  12.         open_terminal();
  13.         inhalt_auslesen.init_log_command_list();
  14.  
  15.         // hier mein 1. Button
  16.         if (e.getSource() == this.kontaktlos_pruefen) {
  17.             gui_leeren();
  18.             if (Connect_Terminal.isTerminal_present() == true) {
  19.                 open_card();
  20.  
  21.                 if (Connect_Card.isCard_present() == true) {
  22.                 textArea.append(Connect_Card.getCard().toString() + "\n");
  23.                     Ats_kontaktlos_OK.ausgabe();
  24.                    
  25.                    
  26.                 } else {
  27.                     kontaktlosFunktion.setVisible(true);
  28.                     }
  29.             } else {
  30.                 textArea.setText("leser ist nicht eingesteckt");
  31.             }
  32.         }
  33.  
  34.     //hier mein 2. Button
  35.  
  36.     if (e.getSource() == this.manuelle_eingabe) {
  37.             gui_leeren();
  38.             open_terminal();
  39.             if (Connect_Terminal.isTerminal_present() == true) {
  40.                 open_card();
  41.                 if (Connect_Card.isCard_present() == true) {
  42.                                                             Atr_anbieten_manuell.ausgabe();
  43.                    
  44.                
  45.                    
  46.                 } else {
  47.                     lblBitteManuelleEingabe.setVisible(true);
  48.                     }  
  49.             } else {
  50.                 GUI_ATR.textArea.append("leser ist nicht eingesteckt\n");
  51.             }
  52.         }
  53.  
  54.         // Kontaktlos prΓΌfen Button
  55.        
  56.         panel.add(kontaktlos_pruefen);
  57.         kontaktlos_pruefen.setSize(85, 35);
  58.         kontaktlos_pruefen.setLocation(80, 5);
  59.         kontaktlos_pruefen.setText("<html>Kontaktlos<br>pr\u00FCfen</html>");
  60.         kontaktlos_pruefen.setVisible(false);      
  61.  
  62.  
  63.         // Manuelle Eingabe Button
  64.        
  65.         panel.add(manuelle_eingabe);
  66.         manuelle_eingabe.setSize(85, 35);
  67.         manuelle_eingabe.setLocation(260, 5);
  68.         manuelle_eingabe.setText("<html>Manuelle<br>Eingabe</html>");
  69.  
  70.  
  71.         addWindowListener(new meinWindowListener());
  72.         kontaktlos_pruefen.addActionListener(this);
  73.         manuelle_eingabe.addActionListener(this);
  74.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement