I have problem ; / I set in global variable :
public static boolean wystawianie;
On other button i set to this variable true. But this if dont see this true/false... This code do always :
JOptionPane.showMessageDialog(null, "Faktura została wystawiona poprawnie");
dispose();  
Kod:
public void actionPerformed(ActionEvent e)
                {
                if(zmienne.wystawianie = true)
            {
                JOptionPane.showMessageDialog(null, "Faktura została wystawiona poprawnie");
                dispose();  
            }
            else
            {
                try
                {
                    String url = "jdbc:mysql://localhost:3306/faktury";
                    String userid = "root";
                    String password = "w4t3q99j";
                    Connection conn= DriverManager.getConnection( url, userid, password );
                    Statement stmt = conn.createStatement();
                    String sql = "DROP DATABASE "+zmienne.a+"";
                    stmt.executeUpdate(sql);
                    System.out.println("usuniete");
                }
                catch(Exception e3)
                {
                    System.out.println(e3);
                }
                JOptionPane.showMessageDialog(null, "Faktura została nie zapisana");
                dispose();  
            }
            }
        });
Anyone know why ? ^^
                        
This statement:
if(zmienne.wystawianie = true)sets the value of
zmienne.wystawianieto true.You should use:
if(zmienne.wystawianie)instead.