TAILIEUCHUNG - 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 .

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.