gpt4 book ai didi

java - .setIcon() 导致 NullPointerException

转载 作者:行者123 更新时间:2023-12-02 05:59:01 25 4
gpt4 key购买 nike

我正在编写一个相当长的代码,它运行得非常好。它突然停止工作,我让其他人测试它并确认它对他们也不起作用。我还尝试回滚代码,甚至几天前也没有任何变化。我放置了一堆 System.out.Println() 来帮助我调试代码损坏的位置以及接收 NullPointerException 的位置。它发生在 initComponents() 处。更奇怪的是,当我使用 GUI Builder 时,initComponenets 中的任何内容都是使用 NetBeans 生成的。我有 15 行名为“Alive #”,这样我就可以在程序崩溃时轻松地在日志中看到。 《Alive 14》是我在崩溃前能看到的最后一个,《Alive 15》从未到达。我只能在下面放一个片段。 https://pastebin.com/ibPfDxMY具有完整的 initComponents()。更令人好奇的是,当从 NetBeans 运行它时,它可以一致地工作,只有当我通过双击或终端运行 .jar 文件时才会出现此错误。

我尝试运行一个空白测试框架,它运行得很好。


public class NewFrame extends javax.swing.JFrame {

public NewFrame() throws IOException, NullPointerException{
System.out.println("Alive 14");
initComponents();
System.out.println("Alive 15");
}


private void initComponents() {

mainPane = new javax.swing.JPanel();
headerPane = new javax.swing.JPanel();
logoButton = new javax.swing.JButton();
exitButton = new javax.swing.JButton();
titleLabel = new javax.swing.JLabel();
logoutButton = new javax.swing.JButton();
PacketPane = new javax.swing.JTabbedPane();
exploitPane = new javax.swing.JPanel();
exploitScroll = new javax.swing.JScrollPane();
exploitList = new javax.swing.JList<>();
customPane = new javax.swing.JPanel();
customFrame = new javax.swing.JPanel();
customScroll = new javax.swing.JScrollPane();
customList = new javax.swing.JList<>();
builderPane = new javax.swing.JPanel();
builderFrame = new javax.swing.JPanel();
builderPlaceholder = new javax.swing.JLabel();
InfoPane = new javax.swing.JTabbedPane();
logPane = new javax.swing.JPanel();
logScroll = new javax.swing.JScrollPane();
logArea = new javax.swing.JTextPane();
chartPane = new javax.swing.JPanel();
chartScroll = new javax.swing.JScrollPane();
chartTable = new javax.swing.JTable();
monsterPane = new javax.swing.JPanel();
monsterScroll = new javax.swing.JScrollPane();
monsterTable = new javax.swing.JTable();
inventoryPane = new javax.swing.JPanel();
inventoryScroll = new javax.swing.JScrollPane();
inventoryList = new javax.swing.JList<>();
bankPane = new javax.swing.JPanel();
bankScroll = new javax.swing.JScrollPane();
bankList = new javax.swing.JList<>();
infoPane = new javax.swing.JPanel();
infoFrame = new javax.swing.JPanel();
goldValue = new javax.swing.JLabel();
acValue = new javax.swing.JLabel();
areaIdValue = new javax.swing.JLabel();
entValue = new javax.swing.JLabel();
usernameValue = new javax.swing.JLabel();
areaValue = new javax.swing.JLabel();
playerCountValue = new javax.swing.JLabel();
playerCountLabel = new javax.swing.JLabel();
areaLabel = new javax.swing.JLabel();
usernameLabel = new javax.swing.JLabel();
entLabel = new javax.swing.JLabel();
areaIdLabel = new javax.swing.JLabel();
acLabel = new javax.swing.JLabel();
goldLabel = new javax.swing.JLabel();
togglePane = new javax.swing.JPanel();
toggleFrame = new javax.swing.JPanel();
afkButton = new javax.swing.JButton();
followButton = new javax.swing.JButton();
farmButton = new javax.swing.JButton();
slideButton = new javax.swing.JButton();
invisibleButton = new javax.swing.JButton();
copyButton = new javax.swing.JButton();
copyLabel = new javax.swing.JLabel();
invisibleLabel = new javax.swing.JLabel();
slideLabel = new javax.swing.JLabel();
farmLabel = new javax.swing.JLabel();
followLabel = new javax.swing.JLabel();
afkLabel = new javax.swing.JLabel();
afkValue = new javax.swing.JLabel();
followValue = new javax.swing.JLabel();
farmValue = new javax.swing.JLabel();
slideValue = new javax.swing.JLabel();
invisibleValue = new javax.swing.JLabel();
copyValue = new javax.swing.JLabel();
SettingsPane = new javax.swing.JPanel();
settingsFrame = new javax.swing.JPanel();
userLabel = new javax.swing.JLabel();
emoteLabel = new javax.swing.JLabel();
settingsSubmitButton = new javax.swing.JButton();
delayLabel = new javax.swing.JLabel();
loopLabel = new javax.swing.JLabel();
settingsSpamButton = new javax.swing.JButton();
emoteList = new javax.swing.JComboBox<>();
loopField = new javax.swing.JTextField();
userField = new javax.swing.JTextField();
textField = new javax.swing.JTextField();
textLabel = new javax.swing.JLabel();
delayField = new javax.swing.JTextField();
ChatPane = new javax.swing.JPanel();
chatScroll = new javax.swing.JScrollPane();
chatArea = new javax.swing.JTextPane();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Yumemi");
setUndecorated(true);

mainPane.setBackground(new java.awt.Color(30, 30, 30));
mainPane.setPreferredSize(new java.awt.Dimension(716, 567));
mainPane.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseDragged(java.awt.event.MouseEvent evt) {
mainPaneMouseDragged(evt);
}
});
mainPane.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
mainPaneMousePressed(evt);
}
});

headerPane.setBackground(new java.awt.Color(0, 0, 0));

logoButton.setBackground(new java.awt.Color(0, 0, 0));
logoButton.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
logoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AQWBot/Icons/icon.png"))); // NOI18N
logoButton.setBorder(null);
logoButton.setBorderPainted(false);
logoButton.setContentAreaFilled(false);
logoButton.setDefaultCapable(false);
logoButton.setFocusPainted(false);
logoButton.setFocusable(false);
logoButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
logoButton.setIconTextGap(0);
logoButton.setRequestFocusEnabled(false);
logoButton.setVerifyInputWhenFocusTarget(false);
logoButton.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseDragged(java.awt.event.MouseEvent evt) {
logoButtonMouseDragged(evt);
}
});
logoButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent evt) {
logoButtonMousePressed(evt);
}
});

exitButton.setBackground(new java.awt.Color(255, 0, 0));
exitButton.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
exitButton.setForeground(new java.awt.Color(255, 255, 255));
exitButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/close.jpg"))); // NOI18N
exitButton.setText("X");
exitButton.setBorderPainted(false);
exitButton.setContentAreaFilled(false);
exitButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
exitButton.setIconTextGap(0);
exitButton.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/close_clicked.jpg"))); // NOI18N
exitButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/close_hover.jpg"))); // NOI18N
exitButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitButtonActionPerformed(evt);
}
});

titleLabel.setFont(new java.awt.Font("Calibri", 1, 14)); // NOI18N
titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
titleLabel.setText("Yumemi");
titleLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseDragged(java.awt.event.MouseEvent evt) {
titleLabelMouseDragged(evt);
}
});
titleLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent evt) {
titleLabelMouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
titleLabelMouseExited(evt);
}
public void mousePressed(java.awt.event.MouseEvent evt) {
titleLabelMousePressed(evt);
}
});

logoutButton.setBackground(new java.awt.Color(255, 102, 0));
logoutButton.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
logoutButton.setForeground(new java.awt.Color(255, 255, 255));
logoutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/logout.jpg"))); // NOI18N
logoutButton.setText("L");
logoutButton.setBorderPainted(false);
logoutButton.setContentAreaFilled(false);
logoutButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
logoutButton.setIconTextGap(0);
logoutButton.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/logout_clicked.jpg"))); // NOI18N
logoutButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/aqwbot/Icons/logout_hover.jpg"))); // NOI18N
logoutButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
logoutButtonActionPerformed(evt);
}
});

javax.swing.GroupLayout headerPaneLayout = new javax.swing.GroupLayout(headerPane);
headerPane.setLayout(headerPaneLayout);
headerPaneLayout.setHorizontalGroup(
headerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(headerPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(logoButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(titleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(logoutButton, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
headerPaneLayout.setVerticalGroup(
headerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(headerPaneLayout.createSequentialGroup()
.addContainerGap()
.addGroup(headerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(headerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(titleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(logoutButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(logoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 9, Short.MAX_VALUE))
);

exploitList.setModel(new javax.swing.AbstractListModel<String>() {
String[] strings = { "Raw", "XP", "Say", "Whisper", "Role Play", "Emote", "", "Join", "Goto", "Move", "House", "", "Friend", "Follow", "Copy", "ID", "", "Party Chat", "Invite Party", "Remove Party", "Summon", "Promote", "Leave Party", "", "Guild Chat", "Create Guild", "Invite to Guild", "Remove from Guild", "Promote Guild", "Demote Guild", "Change MOTD", "Rename Guild", "", "Battle Commands", "", "Custom Commands", "Invisible", "Slide", "Farm", "Share Attack", "", "Staff Commands" };
public int getSize() { return strings.length; }
public String getElementAt(int i) { return strings[i]; }
});
exploitList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
exploitScroll.setViewportView(exploitList);

javax.swing.GroupLayout exploitPaneLayout = new javax.swing.GroupLayout(exploitPane);
exploitPane.setLayout(exploitPaneLayout);
exploitPaneLayout.setHorizontalGroup(
exploitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(exploitPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(exploitScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)
.addContainerGap())
);
exploitPaneLayout.setVerticalGroup(
exploitPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, exploitPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(exploitScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
.addContainerGap())
);

PacketPane.addTab("Commands", exploitPane);

customList.setModel(new javax.swing.AbstractListModel<String>() {
String[] strings = { "Accept Quest", "AutoComplete Quest" };
public int getSize() { return strings.length; }
public String getElementAt(int i) { return strings[i]; }
});
customScroll.setViewportView(customList);

javax.swing.GroupLayout customFrameLayout = new javax.swing.GroupLayout(customFrame);
customFrame.setLayout(customFrameLayout);
customFrameLayout.setHorizontalGroup(
customFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(customFrameLayout.createSequentialGroup()
.addContainerGap()
.addComponent(customScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE)
.addContainerGap())
);
customFrameLayout.setVerticalGroup(
customFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, customFrameLayout.createSequentialGroup()
.addContainerGap()
.addComponent(customScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addContainerGap())
);

javax.swing.GroupLayout customPaneLayout = new javax.swing.GroupLayout(customPane);
customPane.setLayout(customPaneLayout);
customPaneLayout.setHorizontalGroup(
customPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 360, Short.MAX_VALUE)
.addGroup(customPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(customPaneLayout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(customFrame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);
customPaneLayout.setVerticalGroup(
customPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 229, Short.MAX_VALUE)
.addGroup(customPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(customPaneLayout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(customFrame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);

PacketPane.addTab("Custom", customPane);

builderFrame.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));

builderPlaceholder.setText("Accept Args and Data and Etc");

javax.swing.GroupLayout builderFrameLayout = new javax.swing.GroupLayout(builderFrame);
builderFrame.setLayout(builderFrameLayout);
builderFrameLayout.setHorizontalGroup(
builderFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(builderFrameLayout.createSequentialGroup()
.addGap(66, 66, 66)
.addComponent(builderPlaceholder, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(77, Short.MAX_VALUE))
);
builderFrameLayout.setVerticalGroup(
builderFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(builderFrameLayout.createSequentialGroup()
.addGap(77, 77, 77)
.addComponent(builderPlaceholder)
.addContainerGap(118, Short.MAX_VALUE))
);

javax.swing.GroupLayout builderPaneLayout = new javax.swing.GroupLayout(builderPane);
builderPane.setLayout(builderPaneLayout);
builderPaneLayout.setHorizontalGroup(
builderPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(builderPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(builderFrame, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
builderPaneLayout.setVerticalGroup(
builderPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(builderPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(builderFrame, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);

PacketPane.addTab("Packet Builder", builderPane);

logScroll.setBackground(new java.awt.Color(50, 50, 50));
logScroll.setForeground(new java.awt.Color(200, 200, 200));
logScroll.setToolTipText("");

logArea.setEditable(false);
logArea.setBackground(new java.awt.Color(50, 50, 50));
logArea.setContentType("text/pl"); // NOI18N
logArea.setForeground(new java.awt.Color(200, 200, 200));
logScroll.setViewportView(logArea);

javax.swing.GroupLayout logPaneLayout = new javax.swing.GroupLayout(logPane);
logPane.setLayout(logPaneLayout);
logPaneLayout.setHorizontalGroup(
logPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(logPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(logScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)
.addContainerGap())
);
logPaneLayout.setVerticalGroup(
logPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(logPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(logScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
.addContainerGap())
);

InfoPane.addTab("Packets", logPane);

chartScroll.setBackground(new java.awt.Color(50, 50, 50));
chartScroll.setForeground(new java.awt.Color(200, 200, 200));
chartScroll.setToolTipText("");

chartTable.setBackground(new java.awt.Color(50, 50, 50));
chartTable.setForeground(new java.awt.Color(200, 200, 200));
chartTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{},
{},
{},
{}
},
new String [] {

}
));
chartScroll.setViewportView(chartTable);

javax.swing.GroupLayout chartPaneLayout = new javax.swing.GroupLayout(chartPane);
chartPane.setLayout(chartPaneLayout);
chartPaneLayout.setHorizontalGroup(
chartPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(chartPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(chartScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)
.addContainerGap())
);
chartPaneLayout.setVerticalGroup(
chartPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(chartPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(chartScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addContainerGap())
);

InfoPane.addTab("Chart", chartPane);

monsterScroll.setBackground(new java.awt.Color(50, 50, 50));
monsterScroll.setForeground(new java.awt.Color(200, 200, 200));
monsterScroll.setToolTipText("");

monsterTable.setBackground(new java.awt.Color(50, 50, 50));
monsterTable.setForeground(new java.awt.Color(200, 200, 200));
monsterTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{},
{},
{},
{}
},
new String [] {

}
));
monsterScroll.setViewportView(monsterTable);

javax.swing.GroupLayout monsterPaneLayout = new javax.swing.GroupLayout(monsterPane);
monsterPane.setLayout(monsterPaneLayout);
monsterPaneLayout.setHorizontalGroup(
monsterPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(monsterPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(monsterScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)
.addContainerGap())
);
monsterPaneLayout.setVerticalGroup(
monsterPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(monsterPaneLayout.createSequentialGroup()
.addContainerGap()
.addComponent(monsterScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addContainerGap())
);

InfoPane.addTab("Monster", monsterPane);

inventoryList.setModel(new javax.swing.AbstractListModel<String>() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public String getElementAt(int i) { return strings[i]; }
});
inventoryScroll.setViewportView(inventoryList);


最佳答案

我假设这一行会导致NullPointerException:

logoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AQWBot/Icons/icon.png"))); // NOI18N

我也遇到了这个问题,当我将整个路径传递给图像时,它对我有用,例如:(假设图像位于包 at.daselias.resources.icons)

logoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/at/daselias/resources/icons/icon.png"))); // NOI18N

这个问题总是只发生在 jar 文件中,而不是在 IDE 中。

编辑:当然,仅仅解决我建议的行中的问题还不够,您必须在加载资源的所有行中执行此操作。

关于java - .setIcon() 导致 NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55990088/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com