This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
swing:menus_checkboxes_radio [2018/03/27 17:33] gthanos |
swing:menus_checkboxes_radio [2018/03/27 19:21] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== CheckBox Menu Items & RadioButton Menu Items ====== | ====== CheckBox Menu Items & RadioButton Menu Items ====== | ||
| - | Σε αναλογία με τα check box buttons και radio buttons μπορείτε να ορίσετε σε ένα μενού //CheckBox Menu Items// και // | + | Σε αναλογία με τα check box buttons και radio buttons μπορείτε να ορίσετε σε ένα μενού //CheckBox Menu Items// και // |
| + | |||
| + | Για την εκτέλεση του παρακάτω κώδικα θα χρειαστείτε το εικονίδιο [[https:// | ||
| <code java MenuLookDemo.java> | <code java MenuLookDemo.java> | ||
| Line 20: | Line 22: | ||
| import javax.swing.JFrame; | import javax.swing.JFrame; | ||
| - | /* MenuLookDemo.java requires | + | /* MenuLookDemo.java requires middle.gif. */ |
| /* | /* | ||
| Line 57: | Line 59: | ||
| menu.add(menuItem); | menu.add(menuItem); | ||
| - | ImageIcon icon = createImageIcon(" | + | ImageIcon icon = createImageIcon(" |
| menuItem = new JMenuItem(" | menuItem = new JMenuItem(" | ||
| menuItem.setMnemonic(KeyEvent.VK_B); | menuItem.setMnemonic(KeyEvent.VK_B); | ||