[Schmitzm-commits] r1025 - trunk/src/schmitzm/swing
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Sep 21 00:03:20 CEST 2010
Author: alfonx
Date: 2010-09-21 00:03:19 +0200 (Tue, 21 Sep 2010)
New Revision: 1025
Modified:
trunk/src/schmitzm/swing/TestingUtil.java
Log:
Added a function to show BufferedImages
Modified: trunk/src/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src/schmitzm/swing/TestingUtil.java 2010-09-20 20:24:29 UTC (rev 1024)
+++ trunk/src/schmitzm/swing/TestingUtil.java 2010-09-20 22:03:19 UTC (rev 1025)
@@ -2,14 +2,17 @@
import java.awt.Component;
import java.awt.GraphicsEnvironment;
+import java.awt.Image;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
+import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;
+import javax.swing.JLabel;
import schmitzm.lang.LangUtil;
@@ -74,4 +77,8 @@
testGui(gui, gui.getClass().getSimpleName());
}
+ public static void testGui(Image image) throws Throwable {
+ JLabel imgLabel = new JLabel(new ImageIcon(image));
+ testGui(imgLabel, imgLabel.getClass().getSimpleName());
+ }
}
More information about the Schmitzm-commits
mailing list