0

I have problem. I need to create loop, which creates JFrames next to previous one. Frames have to fill whole screen. To determine size of frames I used Toolkit.getScreen() method, but i'm wondering how to determine localization of next frames. Is there any method i could use or i have to do it mathematical?

iboan
  • 15
  • 4

1 Answers1

0

I think you'll have to use the setLocationRelativeTo method. You can pass the previous JFrame instance as the arguement to this method.

Sahil Lakhwani
  • 108
  • 2
  • 11
  • please refer [this](http://stackoverflow.com/questions/23039600/how-to-set-a-jframe-location-beside-another-jframe) answer. It has just a line of mathematics. I guess this will be good to use. – Sahil Lakhwani May 27 '16 at 08:02