Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JFrame.setVisible() - IllegalArgumentException problem

  Asked By: Egidius    Date: Jun 20    Category: Java    Views: 885

Recently a problem has popped up in my program, it comes while
trying to set a JFrame to visible. How exactly can just setting
it to visible cause an IllegalArgumentException?
Container being added to itself is the general message being



1 Answer Found

Answer #1    Answered By: James Williams     Answered On: Jun 20

The method is
public void setVisible(boolean b)

so you need to specify the parameter (whether true or false) in the method

For your case, it will be


Didn't find what you were looking for? Find more on JFrame.setVisible() - IllegalArgumentException problem Or get search suggestion and latest updates.