swing:menus_checkboxes_radio
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
swing:menus_checkboxes_radio [2015/05/11 06:39] – created gthanos | swing:menus_checkboxes_radio [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
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// και // |
- | <code java MenuLookDemo.java> | + | Για την εκτέλεση του παρακάτω κώδικα θα χρειαστείτε το εικονίδιο [[https:// |
- | package | + | |
+ | <code java MenuLookDemo.java> | ||
import java.awt.*; | import java.awt.*; | ||
import java.awt.event.*; | import java.awt.event.*; | ||
Line 22: | Line 22: | ||
import javax.swing.JFrame; | import javax.swing.JFrame; | ||
- | /* MenuLookDemo.java requires | + | /* MenuLookDemo.java requires middle.gif. */ |
/* | /* | ||
Line 59: | 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); | ||
Line 124: | Line 124: | ||
//Create a scrolled text area. | //Create a scrolled text area. | ||
output = new JTextArea(5, | output = new JTextArea(5, | ||
- | output.setEditable(false); | + | output.setEditable(true); |
scrollPane = new JScrollPane(output); | scrollPane = new JScrollPane(output); | ||
swing/menus_checkboxes_radio.1431326380.txt.gz · Last modified: 2015/05/11 05:39 (external edit)