Mildly ironic, because the comparison or equality operator wasn't required in the if condition. A boolean can
be the condition.
It might help to avoid these fundamental errors by using proper terminology and therefore associating the symbols with what they do. '==' and '!=' are equality operators. '=' is one of many assignment operators. There is no 'double equals' operator.
In case I wasn't clear in my first post, most of the code in your main() method belongs somewhere else, either in a constructor or in another method in a driver class. The main() method should be used to start the Swing app on the EDT. The resulting main() method should look something like:
public static void main( String[] args )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
new DriverClass();
} // end method run()
} ); // end method invokeLater()
} //end method main()