import javax.swing.*;输出:
导入 java.awt.*;
class Image extends JFrame {
public static void main(String[] args) throws Exception {
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame();
字符串 src = Image.class.getClassLoader().
getSystemResource(image.jpg”).toString();
frame.getContentPane().add(new JEditorPane(text/html”,
"));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
Please disable your ad blocker and refresh the window to use this website.