Add method for creating JLayer with component
This commit is contained in:
parent
7cfaf2cd06
commit
b9c20a9bc0
@ -10,12 +10,18 @@ import java.awt.Graphics;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JLayer;
|
||||||
|
import javax.swing.plaf.LayerUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author aNNiMON
|
* @author aNNiMON
|
||||||
*/
|
*/
|
||||||
public class GuiUtil {
|
public class GuiUtil {
|
||||||
|
|
||||||
|
public static <T extends JComponent> JLayer<T> createPlanetLayer(T component) {
|
||||||
|
return new JLayer<>(component, (LayerUI<T>) new PlanetBackground());
|
||||||
|
}
|
||||||
|
|
||||||
public static class GradientBackground extends javax.swing.plaf.LayerUI<JComponent> {
|
public static class GradientBackground extends javax.swing.plaf.LayerUI<JComponent> {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user