Here you can find the source of saveFrame(Class> pClass, JFrame pFrame, String pFrameId)
public static void saveFrame(Class<?> pClass, JFrame pFrame, String pFrameId)
//package com.java2s; //License from project: Open Source License import java.util.prefs.Preferences; import javax.swing.JFrame; public class Main { public static void saveFrame(Class<?> pClass, JFrame pFrame, String pFrameId) { Preferences prefs = Preferences.userNodeForPackage(pClass); final String locPrefId = pFrameId + ".location"; final String szPrefId = pFrameId + ".size"; String location = pFrame.getLocation().x + ":" + pFrame.getLocation().y; String size = pFrame.getSize().width + ":" + pFrame.getSize().height; prefs.put(locPrefId, location);/*from ww w. j av a 2 s .c o m*/ prefs.put(szPrefId, size); } }