freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計(jì)算機(jī)外文翻譯--菜單和工具欄-文庫(kù)吧資料

2025-05-21 17:20本頁(yè)面
  

【正文】 s (such as from a toolbar as well as a menu). You can use the same Action instance to create the menu item and toolbar button, and they39。s getActionCommand( ) method to obtain the action mand of the menu item generating the event. This tells the listener which menu item has been clicked, allowing it to react accordingly. This is the approach used in earlier in this chapter , which is discussed later. Alternatively, you can register a separate ActionListener class with each menu item, which takes the guesswork out of determining the menu item selected. However, Swing allows you to go a step further. The most objectoriented approach is to create a specialized Action class that corresponds to each of the tasks a user might request of your application. This lets you bundle the code for each program action together with the action39。 otherwise, the property returnsfalse. TheponentAtIndex property accesses the menu associated with the given index. It is similar to the indexed menu property, except the contents are cast to 4 aComponent. If there is no ponent associated with that index, the getComponentAtIndex( ) accessor returns null. Theponent property returns a reference to this (., the menu bar itself)。F of its opportunity to place the menu bar in the appropriate location. Moving something as fundamental as a menu bar is almost certain to cause confusion and usability challenges for your users。 Figure 145. JMenuBar positioned as a Swing ponent This places the menu bar at the bottom of the frame, as shown in Figure 145. (Note that we set a beveled border around the menu bar to help outline its location.) It would even be possible to add two or three menu bars in different locations. Swing does not require a single menu bar to be anchored to the top of a frame. Because they extend JComponent, multiple menu bars can be positioned anywhere inside a container. Of course, you39。s consternation. The most mon way of dealing with this is to write a menu factory that generates an identical menu bar for each frame your application uses. Although this is a little extra work, the familiarity and fort it brings your
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1