Change...
picture = newJLabel(createImageIcon("images/"+ windowsString + ".gif"));
to...
picture = new JLabel(createImageIcon("images/"+ windowsString + ".gif"));
Change
radiopanel.add(macButton);
to...
radioPanel.add(macButton);
Java is case sensitve, variable names case must match
This...
JComponent newContentPane = new RadioButtonDemo();
I suspect is a copy/paste error. You change the class
name of the original code, but forgot to change any references to it.
Try...
JComponent newContentPane = new OSButtons();
Instead
Update
Okay. Let's assume that you have your source files in C:\Users\Keith\Desktop\components
.
At the command prompt your would compile them by using something like...
C:\> cd C:\Users\Keith\Desktop
C:\Users\Keith\Desktop> javac components.OSButtons.java
C:\Users\Keith\Desktop> java components.OSButtons
There is a direct coalition between the package name and the expected directory of the class files.