Buggy code:
@ SuppressWarnings ( "serial" ) public class AngebotCreate < FormattedTextField > extends JPanel implements ActionListener { private JPanel up ; private JPanel sub_a ; private JPanel sub_b ; private JPanel sub_one ; private JPanel sub_two ; private JPanel mid ; private JPanel down ; private JTextField name ; private JComboBox typ ; private Vector < String > typ_list ; private JFormattedTextField preis ; private JTextField kap ; private JFormattedTextField von ; private JFormattedTextField bis ; private JLabel anbieter ; private JComboBox klima ; private JComboBox sterne ; private JComboBox verpflegung ; private JComboBox bierpreis ; private JComboBox klasse ; private JTextArea beschreibung ; private JButton loeschen ; private JButton bestaetigen ; private JComboBox land ; private JComboBox ort ; private JComboBox landz ; private JComboBox ortz ; private Anbieter anb ; public AngebotCreate ( Anbieter a ) throws ParseException { } private void init ( Anbieter a ) throws ParseException { } @ Override public void actionPerformed ( ActionEvent e ) { if ( ( e . getSource ( ) ) == ( bestaetigen ) ) { String [ ] k = Angebotsverwaltung . angebotNameToErlaubteKriterien ( typ . getSelectedItem ( ) . toString ( ) ) ; for ( int i = 0 ; i < ( sub_two . getComponentCount ( ) ) ; i ++ ) { Component c = sub_two . getComponent ( i ) ; if ( c instanceof JComboBox ) { k [ i ] = ( ( JComboBox ) ( c ) ) . getSelectedItem ( ) . toString ( ) ; } else if ( c instanceof JTextField ) { k [ i ] = ( ( JTextField ) ( c ) ) . getText ( ) ; } } Date q = null ; Date w = null ; Date heute = Methods . getHeuteNullUhr ( ) ; double result = 0.0 ; if ( name . getText ( ) . isEmpty ( ) ) { JOptionPane . showMessageDialog ( this , "Bitte<seq2seq4repair_space>geben<seq2seq4repair_space>Sie<seq2seq4repair_space>einen<seq2seq4repair_space>gueltigen<seq2seq4repair_space>Namen<seq2seq4repair_space>ein" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; } else if ( ( typ . getSelectedIndex ( ) ) == 0 ) { JOptionPane . showMessageDialog ( this , "Bitte<seq2seq4repair_space>waehlen<seq2seq4repair_space>Sie<seq2seq4repair_space>einen<seq2seq4repair_space>Typ<seq2seq4repair_space>aus<seq2seq4repair_space>" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; } else if ( ( ( preis . getValue ( ) ) == null ) || ( preis . getText ( ) . isEmpty ( ) ) ) { JOptionPane . showMessageDialog ( this , "Bitte<seq2seq4repair_space>geben<seq2seq4repair_space>Sie<seq2seq4repair_space>eine<seq2seq4repair_space>gueltigen<seq2seq4repair_space>Preis<seq2seq4repair_space>ein" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; } else if ( ( ( ( kap . getText ( ) ) == null ) || ( kap . getText ( ) . isEmpty ( ) ) ) || ( ( Integer . parseInt ( kap . getText ( ) ) ) <= 0 ) ) { JOptionPane . showMessageDialog ( this , "Bitte<seq2seq4repair_space>geben<seq2seq4repair_space>Sie<seq2seq4repair_space>eine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Kapazitaet<seq2seq4repair_space>ein" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; } else if ( ( ( preis . getText ( ) ) != null ) || ( ! ( preis . getText ( ) . isEmpty ( ) ) ) ) { result = Double . parseDouble ( preis . getText ( ) . replace ( "," , "." ) ) ; } <START_BUG> if ( ( land ) != null ) { <END_BUG> JOptionPane . showMessageDialog ( this , "Sie<seq2seq4repair_space>muessen<seq2seq4repair_space>ein<seq2seq4repair_space>Land<seq2seq4repair_space>auswaehlen" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; return ; } if ( ( typ . getSelectedItem ( ) . toString ( ) ) == ( typ_list . elementAt ( 4 ) ) ) { if ( landz . getSelectedItem ( ) . equals ( "" ) ) { JOptionPane . showMessageDialog ( this , "Sie<seq2seq4repair_space>muessen<seq2seq4repair_space>ein<seq2seq4repair_space>Land<seq2seq4repair_space>als<seq2seq4repair_space>Ziel<seq2seq4repair_space>auswaehlen" , "Angebot<seq2seq4repair_space>erstellen" , JOptionPane . OK_OPTION ) ; return ; } } if ( result != 0 ) { try { q = Methods . stringToDate ( von . getText ( ) ) ; w = Methods . stringToDate ( bis . getText ( ) ) ; if ( ( ! ( Methods . isValidDatestring ( von . getText ( ) ) ) ) || ( ! ( Methods . isValidDatestring ( bis . getText ( ) ) ) ) ) JOptionPane . showMessageDialog ( this , "Ungueltiges<seq2seq4repair_space>Datum" , "Angebot<seq2seq4repair_space>Erstellung" , JOptionPane . OK_OPTION ) ; else if ( w . before ( q ) ) JOptionPane . showMessageDialog ( this , "Das<seq2seq4repair_space>Enddatum<seq2seq4repair_space>ist<seq2seq4repair_space>vor<seq2seq4repair_space>dem<seq2seq4repair_space>Startdatum" , "Angebot<seq2seq4repair_space>Erstellung" , JOptionPane . OK_OPTION ) ; else if ( heute . after ( q ) ) JOptionPane . showMessageDialog ( this , "Das<seq2seq4repair_space>Startdatum<seq2seq4repair_space>ist<seq2seq4repair_space>vor<seq2seq4repair_space>dem<seq2seq4repair_space>heutigen<seq2seq4repair_space>Datum" , "Angebot<seq2seq4repair_space>Erstellung" , JOptionPane . OK_OPTION ) ; else { try { Portal . Angebotsverwaltung ( ) . createAngebot ( ( ( Anbieter ) ( Portal . Accountverwaltung ( ) . getLoggedIn ( ) ) ) , name . getText ( ) , beschreibung . getText ( ) , Angebot . convertNameToTyp ( typ . getSelectedItem ( ) . toString ( ) ) , result , Integer . parseInt ( kap . getText ( ) ) , q , w , k ) ; JOptionPane . showMessageDialog ( this , "Erstellung<seq2seq4repair_space>erfolgreich" ) ; this . removeAll ( ) ; this . validate ( ) ; this . repaint ( ) ; init ( anb ) ; } catch ( InvalidDateException e1 ) { JOptionPane . showMessageDialog ( this , "Ueberpruefen<seq2seq4repair_space>Sie<seq2seq4repair_space>das<seq2seq4repair_space>Datum" , "Angebot<seq2seq4repair_space>Erstellung" , JOptionPane . OK_OPTION ) ; } } } catch ( ParseException e2 ) { JOptionPane . showMessageDialog ( this , "Ueberpruefen<seq2seq4repair_space>Sie<seq2seq4repair_space>das<seq2seq4repair_space>Datum" , "Angebot<seq2seq4repair_space>Erstellung" , JOptionPane . OK_OPTION ) ; } } } else if ( ( e . getSource ( ) ) == ( loeschen ) ) { this . removeAll ( ) ; this . validate ( ) ; this . repaint ( ) ; try { init ( anb ) ; } catch ( ParseException e1 ) { } beschreibung . setText ( "Bitte<seq2seq4repair_space>geben<seq2seq4repair_space>Sie<seq2seq4repair_space>hier<seq2seq4repair_space>eine<seq2seq4repair_space>Beschreibung<seq2seq4repair_space>ein" ) ; addScreen ( ) ; } } public void addScreen ( ) { } public void repaintOrt ( ) { } }

Fix:
if ( land . getSelectedItem ( ) . equals ( "" ) ) {