by fred7269 » Tue May 13, 2008 10:28 am
I'm trying the following -- even if I try one of your examples directly, I still get the same problem (Thanks for the quick reply!):
import com.jidesoft.combobox.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;
import java.util.*;
public class cpivot extends JFrame {
// Read profiles ...
public cpivot() {
setTitle("Test");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(510, 270);
//TableModelPivotDataSource tpds = new TableModelPivotDataSource();
ColorComboBox at = new ColorComboBox();
JMenu file = new JMenu("File");
file.setMnemonic(KeyEvent.VK_F);
JMenuItem fileOpen = new JMenuItem("Open"); //, iconOpen);
fileOpen.setMnemonic(KeyEvent.VK_O);
JMenuItem fileClose = new JMenuItem("Close"); //, iconClose);
fileClose.setMnemonic(KeyEvent.VK_C);
fileClose.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
System.exit(0);
}
});
file.add(fileOpen);
file.add(fileClose);
JMenuBar menubar = new JMenuBar();
menubar.add(file);
add(at);
setJMenuBar(menubar);
setLocationRelativeTo(null);
setVisible(true);
}
public static void main(String[] args) {
new cpivot();
}
}