0

How many JFrames can be visible at a time simultaneously....? I wrote a GUI program that opens another window when a button "Sign in" is clicked.That new window has its own button which opens another window.After the 3rd window no new window is opening.My program had maximum five windows.

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
Akhil V
  • 53
  • 10
  • It sounds like you may have answered your own question. In my opinion, I think you've empirically proven that the answer is 5. – Max von Hippel Oct 29 '17 at 05:04
  • I would recommend having a look at [The Use of Multiple JFrames: Good or Bad Practice?](https://stackoverflow.com/questions/9554636/the-use-of-multiple-jframes-good-or-bad-practice) – MadProgrammer Oct 29 '17 at 05:35

1 Answers1

0

You can have as much as JFrame you want . There isn't any limitations as I know. But if you are facing any tgere should be a solution.

You should just close current JFrame before opening other one.

nitishk72
  • 1,616
  • 3
  • 12
  • 21
  • setVisible(false) for the preceeding frame worked...thanks everyone – Akhil V Oct 29 '17 at 05:50
  • If it works then you should atleast thumbs up to the solution – nitishk72 Oct 29 '17 at 05:59
  • 1
    *"You should just close current JFrame before opening other one."* See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/q/9554636/418556) *"you should atleast thumbs up to the solution"* The OP does not have enough rep. to upvote answers. – Andrew Thompson Oct 29 '17 at 07:35