WebSphere Studio Application Developer Version 5 Programming Guide part 53

WebSphere Studio Application Developer part 53 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | Now select a JList of the Swing components from the palette and drop the list on the jPanelLeft. This component allows the user to select one or more objects from a list. Change the name of the list from jList to jListCustomers and change its gridy property you have to expand constraint from -1 to 1 Figure 14-33 . I Properties X Property Value _L A border component orientation UNKNOWN El constraint x -l y lj width 1 . anchor CENTER fill BOTH gridheight 1 gridwidth 1 gridx -1 gridy 9 insets ipadx 0 ipady 0 weightx 1 weighty i 1 cursor Default Figure 14-33 JList constraints Changing the gridy property aligns the JList below the JLabel within the jPanelLeft bean. Tip The gridy property is used to set the vertical position of objects where the topmost cell has gridy 0. You also have to change the property selectionMode from its initial value MULTIPLE_INTERVAL to SINGLE. This prevents us from selecting multiple elements from the list bean. By now the GUI should look as shown in Figure 14-34. 494 WebSphere Studio Application Developer Version 5 Programming Guide Figure 14-34 Sample GUI stage 3 In case our list contains many entries it is a good idea to have a scroll bar added to the list bean. To do this you need to select the JScrollPane bean from the Swing containers and add it to the jPanelLeft bean. Rename the new scroll pane to jScrollPaneForCustomersList and change its gridy property from -1 to 1. To associate the scrollpane with the jListCustomers bean you can add a line of code to the getJScrollPaneForCustomersLi st method getJListCustomers Even simpler Select the j ListCustomers bean in the Java Beans view and drop it onto the scroll pane. This makes the list a component of the scroll pane and adds the required line of code to the getJScrollPaneForCustomersList method The complete code of the scroll pane is shown in Figure 14-35. If you click the jScrollPaneForCustomersList bean in the Java Beans view the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
28    88    2    26-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.