How can I determine the active JFrame?

Tomaz Strazisnik

Call Frame.getFrames() which will return all frames created by the application.

Frame[] f = Frame.getFrames();
Frame active = null;
for (int i = 0; i < f.lenght; i++) {
  if (f[i].isActive()) {
    active = f[i]; 
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.