Tatsächlich verwende ich normalerweise IntelliJ, das nimmt sich in dem Fall aber nicht viel. Da ich mein User Interface mit dem UI Builder erstelle (ich bin noch nicht so erfahren was Java angeht), verwende ich hierfür Netbeans. Als IDE mag ich die IDE nicht, aber der UI Builder gefällt mir gut.
Ich häng hier mal meinen Code an, ich habe die Bilder jetzt an den von dir empfohlenen Platz verschoben, unter Windows werden mir hingegen immer noch keine Bilder angezeigt. Vielleicht erkennst du ja das Problem.
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JFrame;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author alex
*/
public class StartPage extends javax.swing.JFrame {
private int creditsCounter;
/**
* Creates new form StartPage
*/
public StartPage() {
initComponents();
credits.setVisible(false);
creditsCounter = 0;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
buttonExit = new javax.swing.JToggleButton();
buttonCredits = new javax.swing.JToggleButton();
buttonStart = new javax.swing.JToggleButton();
buttonSelfDestruct = new javax.swing.JButton();
credits = new javax.swing.JLabel();
startPageText = new javax.swing.JLabel();
background = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setTitle("Happy Birthday!");
setBounds(new java.awt.Rectangle(0, 0, 0, 0));
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setMaximumSize(new java.awt.Dimension(1280, 720));
setPreferredSize(new java.awt.Dimension(1280, 720));
setResizable(false);
getContentPane().setLayout(null);
buttonExit.setText("Beenden");
buttonExit.setToolTipText("Wehe...");
buttonExit.setBorderPainted(false);
buttonExit.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
buttonExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonExitActionPerformed(evt);
}
});
getContentPane().add(buttonExit);
buttonExit.setBounds(20, 290, 190, 50);
buttonCredits.setText("Credits");
buttonCredits.setToolTipText("Du weißt doch eh schon wer mich geschrieben hat :P");
buttonCredits.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
buttonCredits.setDoubleBuffered(true);
buttonCredits.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonCreditsActionPerformed(evt);
}
});
getContentPane().add(buttonCredits);
buttonCredits.setBounds(20, 220, 380, 50);
buttonStart.setText("Start");
buttonStart.setToolTipText("Drück mich!");
buttonStart.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
buttonStart.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonStartActionPerformed(evt);
}
});
getContentPane().add(buttonStart);
buttonStart.setBounds(20, 20, 380, 50);
buttonSelfDestruct.setText("Selbstzerstörung");
buttonSelfDestruct.setToolTipText("Traust du dich?");
buttonSelfDestruct.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonSelfDestructActionPerformed(evt);
}
});
getContentPane().add(buttonSelfDestruct);
buttonSelfDestruct.setBounds(210, 290, 190, 50);
credits.setText("jLabel1");
getContentPane().add(credits);
credits.setBounds(420, 20, 840, 320);
startPageText.setIcon(new javax.swing.ImageIcon("startPageText.png"));
getContentPane().add(startPageText);
startPageText.setBounds(425, 20, 830, 320);
background.setIcon(new javax.swing.ImageIcon("startPage.png"));
getContentPane().add(background);
background.setBounds(0, -50, 1330, 820);
pack();
setLocationRelativeTo(null);
}// </editor-fold>