Here you can find the source of addMessageLogger(JLabel t)
Parameter | Description |
---|---|
t | The text component |
public static void addMessageLogger(JLabel t)
//package com.java2s; /*/*from w w w .ja va 2s . co m*/ * $Id: LogUtil.java,v 1.98 2007/08/21 11:31:24 jeffmc Exp $ * * Copyright 1997-2016 Unidata Program Center/University Corporation for * Atmospheric Research, P.O. Box 3000, Boulder, CO 80307, * support@unidata.ucar.edu. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser * General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import java.util.ArrayList; import javax.swing.*; public class Main { /** * Holds components from the application GUIs that messages should be shown */ private static ArrayList messageLogs = new ArrayList(); /** * Add the given component into the list of components that show messages * from the message method calls * * @param t The text component */ public static void addMessageLogger(JTextArea t) { messageLogs.add(t); // Misc.printStack("LogUtil.addMessageLogger:" + messageLogs.size()); } /** * Add the given component into the list of components that show messages * from the message method calls * * @param t The text component */ public static void addMessageLogger(JLabel t) { messageLogs.add(t); // Misc.printStack("LogUtil.addMessageLogger:" + messageLogs.size()); } }