Servus,
Habe folgende kleines Problem. Ich möchte mit Hilfe eines MenuItem ein neues Content Pane öffnen, ich habe auch schon eine ActionListener und einen Actionperfomed..
Nun meine Frage, wie könnte ich das am dümmsten Anstellen ?
Eventuell noch der Quelltext.
Habe folgende kleines Problem. Ich möchte mit Hilfe eines MenuItem ein neues Content Pane öffnen, ich habe auch schon eine ActionListener und einen Actionperfomed..
Nun meine Frage, wie könnte ich das am dümmsten Anstellen ?
Eventuell noch der Quelltext.
Code:
private JMenuItem getbubblesortMenuItem() {
if (bubblesortMenuItem == null) {
bubblesortMenuItem = new JMenuItem();
ImageIcon icon = new ImageIcon( "1.gif" );
bubblesortMenuItem.setIcon(new ImageIcon("1.gif"));
bubblesortMenuItem.setToolTipText("Sortierverfahren BubbleSort");
bubblesortMenuItem.setText("Bubblesort");
bubblesortMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B,
Event.CTRL_MASK, true));
bubblesortMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()");
}
});
}