TAILIEUCHUNG - Sams Teach Yourself Java 6 in 21 Days 5th phần 6

Đầu ra của chương trình này phụ thuộc vào hai đối số quy định khi nó được chạy. Nếu bạn sử dụng 4 và 13, sản lượng sau đây được hiển thị: Ứng dụng này bao gồm hai lớp: Các WorldEnergy nguồn dữ liệu được kết hợp với một trình điều khiển Microsoft Access, theo hình 18,2. | Simpo PDF Merge and Split Unregistered VersionWttp LISTING The Full Text of 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 import . import . import . public class FormatChooser extends JFrame implements ItemListener String formats choose format Atom RSS R-SS RSS String descriptions Atom weblog and syndication format RSS syndication format Netscape RSS RDF syndication format RSS RDF RSS syndication format UserLand JComboBox formatBox new JComboBox JLabel descriptionLabel new JLabel public FormatChooser super Syndication Format setSize 420 150 setDefaultCloseOperation setLayout new BorderLayout for int i 0 i i formats i this add formatBox add descriptionLabel setVisible true public void itemStateChanged ItemEvent event int choice if choice 0 descriptions choice-1 public Insets getInsets return new Insets 50 10 10 10 public static void main String arguments FormatChooser fc new FormatChooser 12 This application extends the combo box example from Day 9 Working with Swing. Figure shows this application. 344 SimpbVDFWrgeyndSp lit unregistered Version - http FIGURE The output of the Formatchooser application. The application creates a combo box from an array of strings and adds an item listener to the component lines 22-25 . Item events are received by the itemStateChanged TternEvent method lines 31-36 which changes the text of a label based on the index number of the selected item. Index 1 corresponds with Atom 2 with RSS 3 with RSS and 4 with RSS . Key Events Key events occur when a key is pressed on the keyboard. Any component can generate these events and a class must implement the

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.