Getting the previously selected item from a JComboBox

Hello I have dropped the idea with a loop defining things but then I would need a string containing the previously selected item from a JComboBox. The combobox is set up by NetBeans and the code for creating it isn´t showed.

Any one have any idea how to make such thing how I imagine it should look (though this doesn´t exactly work):

Exception in thread "main" java.lang.NoClassDefFoundError: ItemEvent at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at java.awt.Component.isCoalesceEventsOverriden(Component.java:5901)
at java.awt.Component.access$400(Component.java:169)
at java.awt.Component$4.run(Component.java:5855)
at java.awt.Component$4.run(Component.java:5853)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Component.java:5852)
at java.awt.Component.<init>(Component.java:5821)
at java.awt.Container.<init>(Container.java:251)
at javax.swing.JComponent.<init>(JComponent.java:581)
at javax.swing.JPanel.<init>(JPanel.java:65)
at javax.swing.JPanel.<init>(JPanel.java:92)
at javax.swing.JPanel.<init>(JPanel.java:100)
at skolehjælp.Panelet.<init>(Panelet.java:9)
at skolehjælp.Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: ItemEvent at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 17 more
Java Result: 1

Thanks in advance. Sorry I havent been able to get to my computer for a while

This is one of the most basic errors in Java. You should be able to fix it in your sleep (no kidding). I suggest you go back to the tutorials, and start working without an IDE, at least until you get the basics of how to compile, run, package, import, reference out-of-package objects, and so on by yourself. This isn't meant as criticism, if you do this now it will save you a lot of trouble later on.