小编Pil*_*kin的帖子

ImageIcon不在java中显示

该代码应该显示背景图像和播放器.但它只是一个粉红色的屏幕.我无法确定问题的来源,这是我的代码.

package main;

import java.awt.*;
import javax.swing.ImageIcon;    
import javax.swing.JFrame;

public class Images extends JFrame {

    public static void main(String Args[]) {

        DisplayMode dm = new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN); // This is going to take 4 parameter, first 2 is x and y for resolotion. Bit depth, the number of bits in a cloour
                                                                                            // 16 is your bit depth. the last one is the monitor refresh, it means it will refres how much it wants
        Images i = new …
Run Code Online (Sandbox Code Playgroud)

java macos swing fullscreen imageicon

1
推荐指数
1
解决办法
4520
查看次数

标签 统计

fullscreen ×1

imageicon ×1

java ×1

macos ×1

swing ×1