I want to move the Text below the image and shape in the given example. Please help me to do it.
package test;
import java.awt.BasicStroke;
import
Consider making use of the API's available functionality...
Take a look at:
For example...
private ImageIcon image;
public TestLabel100(Integer size, String name) {
//...
JLabel textLabel = new JLabel(name);
textLabel.setIcon(image);
textLabel.setHorizontalTextPosition(JLabel.CENTER);
textLabel.setVerticalTextPosition(JLabel.SOUTH);
//textLabel.setBounds(100, 100, 70, 30);
//...
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
//...