正在加载图片...
ResponseBox Methods CLASS ResponseBox Method Argument Description <constructor> Mainwindow Creates a ResponseBox object Mainwindow Creates a Response Box object with n (the second argument) buttons, I <=N <constructor> int <=3. If an invalid N is passed, then the object will include one button. prompt string Prompts the user with the text passed as an argument. Returns an integer that identifies the clicked button See the explanation of the class constants. setlabel Sets the label of the designated button with the passed String. The first argument string identifies the button. See the explanation of the class constants Class Constant Description YES This value identifies the Yes button NO This value identifies the No button. bUTTON 1 This value identifies the leftmost button The value of BUT TON1 is equal to the value of YES buTTON2 This value identifies the middle button Note the middle button becomes the rightmost button if there are only two buttons. The value of BUTTON2 is equal to the value of NO buTTON 3 This value identifies the rightmost button when the Response Box includes three buttons C 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 7-22© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 7 - 22 ResponseBox Methods CLASS: ResponseBox Method Argument Description <constructor> MainWindow Creates a ResponseBox object. <constructor> MainWindow, int Creates a ResponseBox object with N (the second argument) buttons, 1 <= N <= 3. If an invalid N is passed, then the object will include one button. prompt String Prompts the user with the text passed as an argument. Returns an integer that identifies the clicked button. See the explanation of the class constants. setLabel int, String Sets the label of the designated button with the passed String. The first argument identifies the button. See the explanation of the class constants. Class Constant Description YES This value identifies the Yes button. NO This value identifies the No button. BUTTON1 This value identifies the leftmost button. The value of BUTTON1 is equal to the value of YES. BUTTON2 This value identifies the middle button. Note: the middle button becomes the rightmost button if there are only two buttons. The value of BUTTON2 is equal to the value of NO. BUTTON3 This value identifies the rightmost button when the ResponseBox includes three buttons
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有