我知道這可能有點「基本」,但我已經看過每一個可能的教程,他們不告訴我。2 JMenu問題
所以問題1:
我試圖把在JMenuBar的一個環節,怎麼樣我會去這樣做?
問題2:
當我嘗試的東西添加到菜單欄,它不添加它。
我有我所有的進口權,我得到0個錯誤,那麼爲什麼不讓我?
代碼:
JFrame frame = new JFrame();
JMenuBar mb = new JMenuBar();
frame.setJMenuBar(mb);
JMenu file = new JMenu("File");
mb.add(file);
這增加了JMenu的「文件」,你的JMenuBar。你期待它做什麼? – ControlAltDel 2012-04-04 19:56:29
在JMenuBar中你想要什麼樣的鏈接? – ControlAltDel 2012-04-04 19:57:33
@ user1291492就像鏈接去不同的網站,如谷歌或whatnot。 – 2012-04-04 20:06:14