Here is one solution
package foursidesgradient;
import java.awt.*;
import java.awt.geom.Point2D;
import java.awt.image.BufferedImage;
import javax.swing.*;
import static javax.swing.JFrame.EXIT_ON_CLOSE;
public class FourSidesGradient{
public static void main(String[] args) {
JFrame frame = new JFrame("My frame");
frame.add(new MyLabel(200, Color.RED, Color.YELLOW, Color.BLUE, Color.CYAN));
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
private static class MyLabel extends JLabel{
private BufferedImage image0;
private BufferedImage image1;
private BufferedImage image2;
private Color noColor = new Color(255, 255, 255, 0);
private int size;
public MyLabel(int size, Color leftTop, Color rightTop, Color leftBottom, Color rightBottom){
super();
image0 = getTwoWayGradient(size, rightTop,leftBottom);
image1 = getLeftGradient(size, leftTop);
image2 = getRightGradient(size, rightBottom);
this.size = size;
this.setPreferredSize(new Dimension(size, size));
}
private BufferedImage getTwoWayGradient(int size,Color rightTop,Color leftBottom) {
image0 = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = image0.createGraphics();
GradientPaint twoColorGradient = new GradientPaint(size, 0f, rightTop, 0, size, leftBottom);
g2d.setPaint(twoColorGradient);
g2d.fillRect(0, 0, size, size);
return image0;
}
private BufferedImage getLeftGradient(int size, Color RED) {
image1 = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = image1.createGraphics();
float radius = size;
float[] dist = {0f, 1.0f};
Point2D center = new Point2D.Float(0, 0);
Color[] colors2 = {RED, noColor};
RadialGradientPaint two = new RadialGradientPaint(center, radius, dist, colors2);
g2d.setPaint(two);
g2d.fillRect(0, 0, size, size);
return image1;
}
private BufferedImage getRightGradient(int size, Color CYAN) {
image2 = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = image2.createGraphics();
float radius = size;
float[] dist = {0f, 1.0f};
Point2D center = new Point2D.Float(size, size);
Color[] colors2 = {CYAN, noColor};
RadialGradientPaint three = new RadialGradientPaint(center, radius, dist, colors2);
g2d.setPaint(three);
g2d.fillRect(0, 0, size, size);
return image2;
}
@Override
protected void paintComponent(Graphics g){
g.drawImage(image0, 0, 0, null);
g.drawImage(image2, 0, 0, null);
g.drawImage(image1, 0, 0, null);
}
}
}
The result: 
Here is another solution:
package foursidesgradient;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RadialGradientPaint;
import java.awt.geom.Point2D;
import javax.swing.JFrame;
import static javax.swing.JFrame.EXIT_ON_CLOSE;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class FourSidesGradient {
public static void main(String[] args) {
JFrame frame = new JFrame("My frame");
JPanel myPanel = new JPanel();
frame.add(myPanel);
myPanel.add(new MyLabel(200, Color.RED, Color.YELLOW, Color.BLUE, Color.CYAN));
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
private static class MyLabel extends JLabel{
int size;
Color leftTop;
Color rightTop;
Color leftBottom;
Color rightBottom;
public MyLabel(int size, Color leftTop, Color rightTop, Color leftBottom, Color rightBottom){
super();
this.size = size;
this.leftTop = leftTop;
this.rightTop = rightTop;
this.leftBottom = leftBottom;
this.rightBottom = rightBottom;
this.setPreferredSize(new Dimension(size, size));
}
@Override
protected void paintComponent(Graphics g){
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
GradientPaint twoColorGradient = new GradientPaint(
size, 0f, rightTop, 0, size, leftBottom);
float radius = size-(size/4);
float[] dist = {0f, 1.0f};
Point2D center = new Point2D.Float(0f, 0f);
Color noColor = new Color(0f, 0f, 0f, 0f);
Color[] colors = {leftTop, noColor};
RadialGradientPaint thirdColor = new RadialGradientPaint(center, radius, dist, colors);
center = new Point2D.Float(size, size);
Color[] colors2 = {rightBottom, noColor};
RadialGradientPaint fourthColor = new RadialGradientPaint(center, radius, dist, colors2);
g2d.setPaint(twoColorGradient);
g2d.fillRect(0, 0, size, size);
g2d.setPaint(thirdColor);
g2d.fillRect(0, 0, size, size);
g2d.setPaint(fourthColor);
g2d.fillRect(0, 0, size, size);
}
}
}
Second result: 
The pictures will be a little bit different in spite of usage the same methods.