'the image is supposed to render beside the text but it is not doing so
the text is moved like there is an obect beside it but it is not rendering
package com.company;
import javax.swing.*; import javax.swing.ImageIcon;
public class Main {
public static void main(String[] args) {
ImageIcon image = new ImageIcon("005.png");
JFrame frame = new JFrame();
frame.setSize(500, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
JLabel label = new JLabel(image);
label.setText("hello to your personalized setup");
label.setIcon(image);
frame.add(label);
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
