Here you can find the source of applySizeVariant(JComponent c)
public static void applySizeVariant(JComponent c)
//package com.java2s; /*/*w ww . j a va 2 s .com*/ * @(#)QuaquaUtilities.java * * Copyright (c) 2003-2010 Werner Randelshofer * Hausmatt 10, Immensee, CH-6405, Switzerland. * All rights reserved. * * The copyright of this software is owned by Werner Randelshofer. * You may not use, copy or modify this software, except in * accordance with the license agreement you entered into with * Werner Randelshofer. For details see accompanying license terms. */ import javax.swing.*; public class Main { public static void applySizeVariant(JComponent c) { String p = (String) c.getClientProperty("JComponent.sizeVariant"); if (p == null) { } else if (p.equals("regular")) { c.setFont(UIManager.getFont("SystemFont")); } else if (p.equals("small")) { c.setFont(UIManager.getFont("SmallSystemFont")); } else if (p.equals("mini")) { c.setFont(UIManager.getFont("MiniSystemFont")); } } }