en:gui-usage
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
en:gui-usage [2015/01/01 21:56] – [Turtle] roehner | en:gui-usage [2015/01/02 14:07] – [Timer] roehner | ||
---|---|---|---|
Zeile 233: | Zeile 233: | ||
==== JMenuBar ==== | ==== JMenuBar ==== | ||
- | {{:de:menubar.png}} | + | {{:de:menubardemo.png}} |
With a JMenuBar-component you can create a menu bar. The configuration is done via the menus (JMenu-components) | With a JMenuBar-component you can create a menu bar. The configuration is done via the menus (JMenu-components) | ||
Zeile 239: | Zeile 239: | ||
\\ | \\ | ||
---- | ---- | ||
- | ==== JTable ==== | ||
- | {{: | ||
- | Set the number of columns and rows with the attributes // | + | ==== JMenu ==== |
+ | {{: | ||
- | With the method | + | With a JMenu-component you create a menu for a menu bar. In the object-inspector you specify the desired menu bar at the //MenuBar// attribute, |
- | Example: " | + | For each menu command |
- | <code java> | + | \\ |
- | int i = jTabelle.getSelectedRow(); | + | ---- |
- | jTabelle.setValueAt(" | + | |
- | </ | + | |
+ | ==== JPopupMenu ==== | ||
+ | {{: | ||
+ | With a JPopupMenu-component you create a popup menu. In the example a canvas component with yellow background reacts on a rightclick and shows the popup menu. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | In the object inspector you input at the attribute // | ||
+ | |||
+ | For each menu command the Java-Editor creates a corresponding event method. | ||
+ | |||
+ | \\ | ||
+ | ---- | ||
==== Timer ==== | ==== Timer ==== | ||
{{: | {{: | ||
Zeile 263: | Zeile 272: | ||
Example: | Example: | ||
- | <code java> timer1.start();</ | + | <code java> |
+ | ... do anything | ||
+ | timer1.stop(); | ||
+ | </ | ||
+ | \\ | ||
+ | ---- | ||
+ | |||
+ | ==== JTable ==== | ||
+ | {{: | ||
+ | |||
+ | Set the number of columns and rows with the attributes // | ||
+ | |||
+ | With the method // | ||
+ | |||
+ | Example: " | ||
+ | |||
+ | <code java> | ||
+ | int i = jTabelle.getSelectedRow(); | ||
+ | jTabelle.setValueAt(" | ||
+ | </ | ||
+ | \\ | ||
+ | ---- | ||
en/gui-usage.txt · Zuletzt geändert: 2022/09/02 10:20 von 127.0.0.1