Java Window getWindowTitle(Window window)

Here you can find the source of getWindowTitle(Window window)

Description

get Window Title

License

Apache License

Declaration

public static String getWindowTitle(Window window) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.Window;
import javax.swing.JDialog;
import javax.swing.JFrame;

public class Main {

    public static String getWindowTitle(Window window) {
        if (window instanceof JFrame) {
            return ((JFrame) window).getTitle();
        }/*ww w  .  j  av a  2 s.c o m*/

        if (window instanceof JDialog) {
            return ((JDialog) window).getTitle();
        }

        return null;
    }
}

Related

  1. flashMessage(final Window parent, String string)
  2. getVisibleWindowByName(String name)
  3. getWindow(final Object source)
  4. getWindow(String title)
  5. getWindowNormalBounds(Window window)
  6. getWindowTitle(Window window)
  7. growIfNecessary(Window window)
  8. hideWaitPane(Window win, Timer timer)
  9. installPrefsHandler(final Preferences prefs, final String name, Window window)