01: package org.mactor.ui;
02:
03: import java.text.SimpleDateFormat;
04: import java.util.Calendar;
05: import javax.swing.Icon;
06: import javax.swing.ImageIcon;
07:
08: public class GUIUtil {
09: private static final SimpleDateFormat sdf = new SimpleDateFormat(
10: "d MMM HH:mm:ss.SSS");
11:
12: public static final Icon loadIcon(String name) {
13: return new ImageIcon(TestPanel.class.getResource(name));
14: }
15:
16: public static final String format(Calendar time) {
17: if (time == null)
18: return "";
19: return sdf.format(time.getTime());
20: }
21: }
|