I am having a difficult time with this one line of code for my homework that is due Sun.:
Modify the Inventory5 Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the Inventory5. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display.
Add a company logo to the GUI using Java graphics classes :
package inventory5;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.NumberFormat;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.UIManager;
class Inventory5Main implements ActionListener
{
XboxDVD[] product;
JTextField[] fields;
NumberFormat nf;
public void actionPerformed(ActionEvent e)
{
int index = ((JComboBox)e.getSource()).getSelectedIndex();
populateFields(index);
}
public static void main(String[] args)
{
try
{
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch (Exception e)
{
System.err.println(e.getClass().getName() + ": " + e.getMessage());
}
Inventory5Main test = new Inventory5Main();
test.initXboxDVD();
test.showGUI();
test.populateFields(0);
}
private void initXboxDVD() {
throw new UnsupportedOperationException("Not yet implemented");
}
private void populateFields(int i) {
throw new UnsupportedOperationException("Not yet implemented");
}
private void showGUI() {
throw new UnsupportedOperationException("Not yet implemented");
}
/*public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet.");
}
private void initXboxDVD() {
throw new UnsupportedOperationException("Not yet implemented");
}
private void populateFields(int index) {
throw new UnsupportedOperationException("Not yet implemented");
}
private void showGUI() {
throw new UnsupportedOperationException("Not yet implemented");*/
}
XboxDVD[] product; This is where the problem is ........and i dont know where or how to correct this !