-1
我试图使用从数据库表中抓取的名称创建JMenu,因此JMenu项目的数量将变化。分配可变数量的新对象
public static JMenuBar drawMenuBar(){
ArrayList List = grabSQLTableNames();
JMenuBar menu = new JMenuBar();
JMenu contracts = new JMenu("Contracts");
//from here I am a bit stuck on how to add new JMenuItems to the Menu
}
任何帮助都会很棒。
这工作!谢谢! –