I'm creating an About dialog for my program and have run into an issue. Whenever I launch the dialog, the title text sets properly, but the text inside the dialog says "JOptionPane Message". Before it wouldn't even show the label I added to the dialog, but that fixed itself (I'm not entirely sure how) but now it displays both the added text and the "JOptionPane Message".
Code for the dialog:
about.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
JOptionPane optionPane = new JOptionPane();
JDialog dialog = optionPane.createDialog("About");
JLabel aboutText = new JLabel("Text goes here", JLabel.CENTER);
dialog.add(aboutText, BorderLayout.NORTH);
dialog.setVisible(true);
}
});
So the text works now, which is nice. But how do I get rid of the part that says "JOptionPane Message"?